<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: nikhilmwarrier</title>
    <description>The latest articles on DEV Community by nikhilmwarrier (@nikhilmwarrier).</description>
    <link>https://dev.to/nikhilmwarrier</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F474411%2F56e9fd95-179e-4be2-b723-d989e091912f.png</url>
      <title>DEV Community: nikhilmwarrier</title>
      <link>https://dev.to/nikhilmwarrier</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nikhilmwarrier"/>
    <language>en</language>
    <item>
      <title>Quick Tips: String Padding in JS</title>
      <dc:creator>nikhilmwarrier</dc:creator>
      <pubDate>Thu, 27 May 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/nikhilmwarrier/quick-tips-string-padding-in-js-3583</link>
      <guid>https://dev.to/nikhilmwarrier/quick-tips-string-padding-in-js-3583</guid>
      <description>&lt;h1&gt;
  
  
  Quick Tip #1: String Padding in JavaScript
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WiGjF4UN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://nikhil.thedev.id/blog/posts/img/stringpad-cover.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WiGjF4UN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://nikhil.thedev.id/blog/posts/img/stringpad-cover.png" alt="An example image"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Use the &lt;code&gt;padStart()&lt;/code&gt; string method with the string length and the string to fill the padding with.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const text = "Party"
text.padStart(7, "🎉 ") //"🎉 Party"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Actual Use Case
&lt;/h2&gt;

&lt;p&gt;Suppose you have an array of binary numbers which need not necessarily be in the standard 8-digit format. We want to add "padding" to it so it looks like the 8-digit eyecandy we all know and love.&lt;/p&gt;

&lt;p&gt;Here is how to do it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const binaryNums = [0, 1101, 011010, 1010]
const paddedBinary = []

binaryNums.forEach(num =&amp;gt; {
  const str = num.toString(); // convert to string
  const paddedStr = str.padStart(8, "0") // fix the length of string at 8, and add padding with "0"
  paddedBinary.push(Number(paddedStr)
})

// paddedBinary = [00000000, 00001101, 00011010, 00001010]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart"&gt;MDN Docs&lt;/a&gt; for more info.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>tips</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>FluidCSS v0.5 released!</title>
      <dc:creator>nikhilmwarrier</dc:creator>
      <pubDate>Wed, 25 Nov 2020 08:34:16 +0000</pubDate>
      <link>https://dev.to/nikhilmwarrier/fluidcss-v0-5-released-57j5</link>
      <guid>https://dev.to/nikhilmwarrier/fluidcss-v0-5-released-57j5</guid>
      <description>&lt;p&gt;Hey!&lt;br&gt;
I have been working on a CSS library called FluidCSS, and after a fortnight of hard-coding, v0.5 is here!&lt;/p&gt;
&lt;h2&gt;
  
  
  Ideals behind FluidCSS
&lt;/h2&gt;

&lt;p&gt;FluidCSS is a CSS library designed for customisability, and is especially aimed at designers/developers who want to quickly make a working prototype of their design. &lt;/p&gt;

&lt;p&gt;Which means, it has all the stuff you might need, like toggle switches, custom not-ugly checkboxes, radio buttons, modals, etc.&lt;/p&gt;

&lt;p&gt;Another highlight is full customisability with css variables without any preprocessors [like sass, less, etc.]&lt;/p&gt;

&lt;p&gt;What is doesn't have is a solid layout system. And it was on purpose. This removes memorising of unnecessary class names and stuff that would require a steep learning curve.&lt;/p&gt;

&lt;p&gt;If you are asking why FluidCSS exists when there are viable alternatives like Bootstrap or Bulma, there are two reasons:&lt;/p&gt;

&lt;p&gt;A. It's like comparing Photoshop to MS Paint. Photoshop is an advanced tool with a really steep learning curve, but Paint is a simple and intuitive tool. If you want to quickly crop a photo, which one would you rather choose?&lt;/p&gt;

&lt;p&gt;B. The second reason is rather personal: I was dead bored, thanks to COVID-19. &lt;/p&gt;

&lt;p&gt;Here is the GitHub repo:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i3JOwpme--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/nikhilmwarrier"&gt;
        nikhilmwarrier
      &lt;/a&gt; / &lt;a href="https://github.com/nikhilmwarrier/fluidcss"&gt;
        fluidcss
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A minimal, hackable css library with responsive design in mind.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
FluidCSS v0.7&lt;/h1&gt;
&lt;p&gt;Welcome to FluidCSS v0.7!&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://raw.githubusercontent.com/nikhilmwarrier/fluidcss/v0.6/docs/res/FluidCSS-banner.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W7Bfxy42--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/nikhilmwarrier/fluidcss/v0.6/docs/res/FluidCSS-banner.png" alt="FluidCSS Banner"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
Changelog&lt;/h1&gt;
&lt;p&gt;This is a complete rewrite and overhaul. Some key changes are underlined below:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;New Build System
&lt;blockquote&gt;
&lt;p&gt;FluidCSS is now written in Sass! [More specifically SCSS]
(This was mainly due to maintainability issues while writing a big library in vanilla CSS.)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;We now have a Responsive Grid system!&lt;/li&gt;
&lt;li&gt;Added a better button ripple animation [as seen in Material Design]&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Shoutout to all stargazers and contributors!&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/nikhilmwarrier/fluidcss/network/members"&gt;&lt;img src="https://camo.githubusercontent.com/947ebd235666a1141c91df00953216f7274ca384a1cac2674fe8fdc5961c0cf1/68747470733a2f2f7265706f726f737465722e636f6d2f666f726b732f6e696b68696c6d776172726965722f666c756964637373" alt="Forkers repo roster for @nikhilmwarrier/fluidcss"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nikhilmwarrier/fluidcss/stargazers"&gt;&lt;img src="https://camo.githubusercontent.com/8cc686c1267f6db9adc06e0cb4048d99963043ad60509e58d194ea9e9ded79bb/68747470733a2f2f7265706f726f737465722e636f6d2f73746172732f6e696b68696c6d776172726965722f666c756964637373" alt="Stargazers repo roster for @nikhilmwarrier/fluidcss"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/nikhilmwarrier/fluidcss"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;The project is live at &lt;a href="https://nikhilmwarrier.github.io/fluidcss"&gt;https://nikhilmwarrier.github.io/fluidcss&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Contributions very wholehartedlly welcome!&lt;/p&gt;

&lt;p&gt;PS: Also, be sure to check out the animated gradient on the &lt;a href="https://nikhilmwarrier.github.io/fluidcss"&gt;Homepage&lt;/a&gt;!&lt;/p&gt;

&lt;h2&gt;
  
  
  Some Screenshots:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--60ARIn1---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m6bvno6zepyw0swh3twr.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--60ARIn1---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m6bvno6zepyw0swh3twr.jpeg" alt="Alt Text" width="880" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K2evdppw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n9yy0g774ua0ya77z1h3.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K2evdppw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n9yy0g774ua0ya77z1h3.jpeg" alt="Alt Text" width="880" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--87KCp94g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6e2sy7hf0g8je4193p8f.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--87KCp94g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6e2sy7hf0g8je4193p8f.jpeg" alt="Alt Text" width="880" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b8TJw2Xm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pwvkg7oepxfph932cq1b.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b8TJw2Xm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pwvkg7oepxfph932cq1b.jpeg" alt="Alt Text" width="880" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZFKmGNdI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7ss4g7f0yk8nzhcrzd1h.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZFKmGNdI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7ss4g7f0yk8nzhcrzd1h.jpeg" alt="Alt Text" width="880" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>frameworks</category>
      <category>contributorswanted</category>
    </item>
    <item>
      <title>Inviting frontend devs to FluidCSS! </title>
      <dc:creator>nikhilmwarrier</dc:creator>
      <pubDate>Thu, 12 Nov 2020 09:27:08 +0000</pubDate>
      <link>https://dev.to/nikhilmwarrier/inviting-frontend-devs-to-fluidcss-1kdg</link>
      <guid>https://dev.to/nikhilmwarrier/inviting-frontend-devs-to-fluidcss-1kdg</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fnikhilmwarrier.github.io%2Ffluidcss%2Fres%2Ffluidcss.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fnikhilmwarrier.github.io%2Ffluidcss%2Fres%2Ffluidcss.png" alt="FluidCSS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hey there!&lt;/p&gt;

&lt;p&gt;I used to use stuff like Bootstrap and other CSS libraries, but I noticed that there were a lot of stuff that actually wasn't used, but negatively contributed on file size and loading speeds.&lt;/p&gt;

&lt;p&gt;Check out this video from Gary Simon at &lt;a href="http://youtube.com/user/DesignCourse" rel="noopener noreferrer"&gt;Design Course&lt;/a&gt;. This video goes more in-depth on this particular topic, and is one of my sources for inspiration.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/bXeeMuKI2YM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;Due to these reasons, I decided to create a frontend CSS framework that was focused on customisability and speed, and removing stuff that won't be used. &lt;/p&gt;

&lt;p&gt;After a lot of abstract thoughts, I created &lt;a href="https://nikhilmwarrier.github.io/fluidcss" rel="noopener noreferrer"&gt;FluidCSS&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;FluidCSS is designed to be easy to customize, and has all the basic stuff you will need, but you must code everything else yourself.&lt;/p&gt;

&lt;p&gt;For example, there is a class to create a toggle switch, but there is no grid layout system.&lt;/p&gt;

&lt;p&gt;This drastically changes everything. &lt;/p&gt;

&lt;p&gt;For one, the file size is a lot less.&lt;br&gt;
Also, beginner developers will not be overwhelmed by the CSS and it will encourage them to tweak the styles.&lt;/p&gt;

&lt;p&gt;It will also help more experienced developers to rapidly prototype their designs without worrying about re-creating the same old components or adding a new color scheme.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/nikhilmwarrier" rel="noopener noreferrer"&gt;
        nikhilmwarrier
      &lt;/a&gt; / &lt;a href="https://github.com/nikhilmwarrier/fluidcss" rel="noopener noreferrer"&gt;
        fluidcss
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A minimal, hackable css library with responsive design in mind.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;FluidCSS v0.7&lt;/h1&gt;

&lt;/div&gt;
&lt;p&gt;Welcome to FluidCSS v0.7!&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/nikhilmwarrier/fluidcss/v0.6/docs/res/FluidCSS-banner.png"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fnikhilmwarrier%2Ffluidcss%2Fv0.6%2Fdocs%2Fres%2FFluidCSS-banner.png" alt="FluidCSS Banner"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Changelog&lt;/h1&gt;

&lt;/div&gt;
&lt;p&gt;This is a complete rewrite and overhaul. Some key changes are underlined below:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;New Build System
&lt;blockquote&gt;
&lt;p&gt;FluidCSS is now written in Sass! [More specifically SCSS]
(This was mainly due to maintainability issues while writing a big library in vanilla CSS.)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;We now have a Responsive Grid system!&lt;/li&gt;
&lt;li&gt;Added a better button ripple animation [as seen in Material Design]&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Shoutout to all stargazers and contributors!&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/nikhilmwarrier/fluidcss/network/members" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/38404a2e8f8757d00a78096607add1d2eb5fd21986e0a239fdbf95bb89ae0df9/68747470733a2f2f7265706f726f737465722e636f6d2f666f726b732f6e696b68696c6d776172726965722f666c756964637373" alt="Forkers repo roster for @nikhilmwarrier/fluidcss"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nikhilmwarrier/fluidcss/stargazers" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/cf6ac9ecfaa45d493b04a1ee4000c26d76212a20345e3eb295338bf56e4b20e9/68747470733a2f2f7265706f726f737465722e636f6d2f73746172732f6e696b68696c6d776172726965722f666c756964637373" alt="Stargazers repo roster for @nikhilmwarrier/fluidcss"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/nikhilmwarrier/fluidcss" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;Be sure to share your opinions in the comments secton!&lt;/p&gt;

&lt;p&gt;PS: I really need contributors to this project &lt;strong&gt;URGENTLY!!!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;EDIT:&lt;br&gt;
Everyone is commenting about PurgeCSS. I actually meant to make something that can easily be customized, but provides enough components, like toggle switches, so that the developer can focus on more client-specific things like layouts and save time, but not end up with a generic bootstrapped website.&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
