{"@attributes":{"version":"2.0"},"channel":{"title":"DEV Community: nikhilmwarrier","description":"The latest articles on DEV Community by nikhilmwarrier (@nikhilmwarrier).","link":"https:\/\/dev.to\/nikhilmwarrier","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","title":"DEV Community: nikhilmwarrier","link":"https:\/\/dev.to\/nikhilmwarrier"},"language":"en","item":[{"title":"Quick Tips: String Padding in JS","pubDate":"Thu, 27 May 2021 00:00:00 +0000","link":"https:\/\/dev.to\/nikhilmwarrier\/quick-tips-string-padding-in-js-3583","guid":"https:\/\/dev.to\/nikhilmwarrier\/quick-tips-string-padding-in-js-3583","description":"<h1>\n  \n  \n  Quick Tip #1: String Padding in JavaScript\n<\/h1>\n\n<p><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\"><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\"><\/a><br><br>\nUse the <code>padStart()<\/code> string method with the string length and the string to fill the padding with.<\/p>\n\n<p>Example:<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>const text = \"Party\"\ntext.padStart(7, \"\ud83c\udf89 \") \/\/\"\ud83c\udf89 Party\"\n\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<h2>\n  \n  \n  Actual Use Case\n<\/h2>\n\n<p>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.<\/p>\n\n<p>Here is how to do it:<br>\n<\/p>\n\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>const binaryNums = [0, 1101, 011010, 1010]\nconst paddedBinary = []\n\nbinaryNums.forEach(num =&gt; {\n  const str = num.toString(); \/\/ convert to string\n  const paddedStr = str.padStart(8, \"0\") \/\/ fix the length of string at 8, and add padding with \"0\"\n  paddedBinary.push(Number(paddedStr)\n})\n\n\/\/ paddedBinary = [00000000, 00001101, 00011010, 00001010]\n\n<\/code><\/pre>\n\n<\/div>\n\n\n\n<p>See the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/padStart\">MDN Docs<\/a> for more info.<\/p>\n\n","category":["javascript","webdev","tips","todayilearned"]},{"title":"FluidCSS v0.5 released!","pubDate":"Wed, 25 Nov 2020 08:34:16 +0000","link":"https:\/\/dev.to\/nikhilmwarrier\/fluidcss-v0-5-released-57j5","guid":"https:\/\/dev.to\/nikhilmwarrier\/fluidcss-v0-5-released-57j5","description":"<p>Hey!<br>\nI have been working on a CSS library called FluidCSS, and after a fortnight of hard-coding, v0.5 is here!<\/p>\n<h2>\n  \n  \n  Ideals behind FluidCSS\n<\/h2>\n\n<p>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. <\/p>\n\n<p>Which means, it has all the stuff you might need, like toggle switches, custom not-ugly checkboxes, radio buttons, modals, etc.<\/p>\n\n<p>Another highlight is full customisability with css variables without any preprocessors [like sass, less, etc.]<\/p>\n\n<p>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.<\/p>\n\n<p>If you are asking why FluidCSS exists when there are viable alternatives like Bootstrap or Bulma, there are two reasons:<\/p>\n\n<p>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?<\/p>\n\n<p>B. The second reason is rather personal: I was dead bored, thanks to COVID-19. <\/p>\n\n<p>Here is the GitHub repo:<\/p>\n\n\n<div class=\"ltag-github-readme-tag\">\n  <div class=\"readme-overview\">\n    <h2>\n      <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\">\n      <a href=\"https:\/\/github.com\/nikhilmwarrier\">\n        nikhilmwarrier\n      <\/a> \/ <a href=\"https:\/\/github.com\/nikhilmwarrier\/fluidcss\">\n        fluidcss\n      <\/a>\n    <\/h2>\n    <h3>\n      A minimal, hackable css library with responsive design in mind.\n    <\/h3>\n  <\/div>\n  <div class=\"ltag-github-body\">\n    \n<div id=\"readme\" class=\"md\">\n<h1>\nFluidCSS v0.7<\/h1>\n<p>Welcome to FluidCSS v0.7!<\/p>\n<p><a rel=\"noopener noreferrer\" href=\"https:\/\/raw.githubusercontent.com\/nikhilmwarrier\/fluidcss\/v0.6\/docs\/res\/FluidCSS-banner.png\"><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\"><\/a><\/p>\n<h1>\nChangelog<\/h1>\n<p>This is a complete rewrite and overhaul. Some key changes are underlined below:<\/p>\n<ul>\n<li>New Build System\n<blockquote>\n<p>FluidCSS is now written in Sass! [More specifically SCSS]\n(This was mainly due to maintainability issues while writing a big library in vanilla CSS.)<\/p>\n<\/blockquote>\n<\/li>\n<li>We now have a Responsive Grid system!<\/li>\n<li>Added a better button ripple animation [as seen in Material Design]<\/li>\n<\/ul>\n<h2>\nShoutout to all stargazers and contributors!<\/h2>\n<p><a href=\"https:\/\/github.com\/nikhilmwarrier\/fluidcss\/network\/members\"><img src=\"https:\/\/camo.githubusercontent.com\/947ebd235666a1141c91df00953216f7274ca384a1cac2674fe8fdc5961c0cf1\/68747470733a2f2f7265706f726f737465722e636f6d2f666f726b732f6e696b68696c6d776172726965722f666c756964637373\" alt=\"Forkers repo roster for @nikhilmwarrier\/fluidcss\"><\/a><\/p>\n<p><a href=\"https:\/\/github.com\/nikhilmwarrier\/fluidcss\/stargazers\"><img src=\"https:\/\/camo.githubusercontent.com\/8cc686c1267f6db9adc06e0cb4048d99963043ad60509e58d194ea9e9ded79bb\/68747470733a2f2f7265706f726f737465722e636f6d2f73746172732f6e696b68696c6d776172726965722f666c756964637373\" alt=\"Stargazers repo roster for @nikhilmwarrier\/fluidcss\"><\/a><\/p>\n<\/div>\n\n\n\n<\/div>\n<br>\n  <div class=\"gh-btn-container\"><a class=\"gh-btn\" href=\"https:\/\/github.com\/nikhilmwarrier\/fluidcss\">View on GitHub<\/a><\/div>\n<br>\n<\/div>\n<br>\n\n\n<p>The project is live at <a href=\"https:\/\/nikhilmwarrier.github.io\/fluidcss\">https:\/\/nikhilmwarrier.github.io\/fluidcss<\/a><\/p>\n\n<p>Contributions very wholehartedlly welcome!<\/p>\n\n<p>PS: Also, be sure to check out the animated gradient on the <a href=\"https:\/\/nikhilmwarrier.github.io\/fluidcss\">Homepage<\/a>!<\/p>\n\n<h2>\n  \n  \n  Some Screenshots:\n<\/h2>\n\n<p><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\"><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\"><\/a><\/p>\n\n<p><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\"><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\"><\/a><\/p>\n\n<p><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\"><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\"><\/a><\/p>\n\n<p><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\"><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\"><\/a><\/p>\n\n<p><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\"><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\"><\/a><\/p>\n\n","category":["css","html","frameworks","contributorswanted"]},{"title":"Inviting frontend devs to FluidCSS! ","pubDate":"Thu, 12 Nov 2020 09:27:08 +0000","link":"https:\/\/dev.to\/nikhilmwarrier\/inviting-frontend-devs-to-fluidcss-1kdg","guid":"https:\/\/dev.to\/nikhilmwarrier\/inviting-frontend-devs-to-fluidcss-1kdg","description":"<p><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\"><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\"><\/a><\/p>\n\n<p>Hey there!<\/p>\n\n<p>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.<\/p>\n\n<p>Check out this video from Gary Simon at <a href=\"http:\/\/youtube.com\/user\/DesignCourse\" rel=\"noopener noreferrer\">Design Course<\/a>. This video goes more in-depth on this particular topic, and is one of my sources for inspiration.<\/p>\n\n<blockquote>\n<p><iframe width=\"710\" height=\"399\" src=\"https:\/\/www.youtube.com\/embed\/bXeeMuKI2YM\">\n<\/iframe>\n<\/p>\n<\/blockquote>\n\n\n\n\n<p>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. <\/p>\n\n<p>After a lot of abstract thoughts, I created <a href=\"https:\/\/nikhilmwarrier.github.io\/fluidcss\" rel=\"noopener noreferrer\">FluidCSS<\/a>. <\/p>\n\n<p>FluidCSS is designed to be easy to customize, and has all the basic stuff you will need, but you must code everything else yourself.<\/p>\n\n<p>For example, there is a class to create a toggle switch, but there is no grid layout system.<\/p>\n\n<p>This drastically changes everything. <\/p>\n\n<p>For one, the file size is a lot less.<br>\nAlso, beginner developers will not be overwhelmed by the CSS and it will encourage them to tweak the styles.<\/p>\n\n<p>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.<\/p>\n\n\n<div class=\"ltag-github-readme-tag\">\n  <div class=\"readme-overview\">\n    <h2>\n      <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\">\n      <a href=\"https:\/\/github.com\/nikhilmwarrier\" rel=\"noopener noreferrer\">\n        nikhilmwarrier\n      <\/a> \/ <a href=\"https:\/\/github.com\/nikhilmwarrier\/fluidcss\" rel=\"noopener noreferrer\">\n        fluidcss\n      <\/a>\n    <\/h2>\n    <h3>\n      A minimal, hackable css library with responsive design in mind.\n    <\/h3>\n  <\/div>\n  <div class=\"ltag-github-body\">\n    \n<div id=\"readme\" class=\"md\">\n<div class=\"markdown-heading\">\n<h1 class=\"heading-element\">FluidCSS v0.7<\/h1>\n\n<\/div>\n<p>Welcome to FluidCSS v0.7!<\/p>\n<p><a rel=\"noopener noreferrer nofollow\" href=\"https:\/\/raw.githubusercontent.com\/nikhilmwarrier\/fluidcss\/v0.6\/docs\/res\/FluidCSS-banner.png\"><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\"><\/a><\/p>\n<div class=\"markdown-heading\">\n<h1 class=\"heading-element\">Changelog<\/h1>\n\n<\/div>\n<p>This is a complete rewrite and overhaul. Some key changes are underlined below:<\/p>\n<ul>\n<li>New Build System\n<blockquote>\n<p>FluidCSS is now written in Sass! [More specifically SCSS]\n(This was mainly due to maintainability issues while writing a big library in vanilla CSS.)<\/p>\n<\/blockquote>\n<\/li>\n<li>We now have a Responsive Grid system!<\/li>\n<li>Added a better button ripple animation [as seen in Material Design]<\/li>\n<\/ul>\n<div class=\"markdown-heading\">\n<h2 class=\"heading-element\">Shoutout to all stargazers and contributors!<\/h2>\n\n<\/div>\n<p><a href=\"https:\/\/github.com\/nikhilmwarrier\/fluidcss\/network\/members\" rel=\"noopener noreferrer\"><img src=\"https:\/\/camo.githubusercontent.com\/38404a2e8f8757d00a78096607add1d2eb5fd21986e0a239fdbf95bb89ae0df9\/68747470733a2f2f7265706f726f737465722e636f6d2f666f726b732f6e696b68696c6d776172726965722f666c756964637373\" alt=\"Forkers repo roster for @nikhilmwarrier\/fluidcss\"><\/a><\/p>\n<p><a href=\"https:\/\/github.com\/nikhilmwarrier\/fluidcss\/stargazers\" rel=\"noopener noreferrer\"><img src=\"https:\/\/camo.githubusercontent.com\/cf6ac9ecfaa45d493b04a1ee4000c26d76212a20345e3eb295338bf56e4b20e9\/68747470733a2f2f7265706f726f737465722e636f6d2f73746172732f6e696b68696c6d776172726965722f666c756964637373\" alt=\"Stargazers repo roster for @nikhilmwarrier\/fluidcss\"><\/a><\/p>\n<\/div>\n\n\n\n<\/div>\n<br>\n  <div class=\"gh-btn-container\"><a class=\"gh-btn\" href=\"https:\/\/github.com\/nikhilmwarrier\/fluidcss\" rel=\"noopener noreferrer\">View on GitHub<\/a><\/div>\n<br>\n<\/div>\n<br>\n\n\n<p>Be sure to share your opinions in the comments secton!<\/p>\n\n<p>PS: I really need contributors to this project <strong>URGENTLY!!!<\/strong><\/p>\n\n<p>EDIT:<br>\nEveryone 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.<\/p>\n\n","category":["css","html","opensource"]}]}}