<?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: Hamza</title>
    <description>The latest articles on DEV Community by Hamza (@hamza777).</description>
    <link>https://dev.to/hamza777</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%2F686476%2F92f0c3e5-c0b3-4f28-8d0c-eeb1460534ae.jpeg</url>
      <title>DEV Community: Hamza</title>
      <link>https://dev.to/hamza777</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hamza777"/>
    <language>en</language>
    <item>
      <title>Awesome VSCode extensions for a better coding experience [ Part 2 ]</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Sat, 04 Jun 2022 08:00:45 +0000</pubDate>
      <link>https://dev.to/hamza777/awesome-vscode-extensions-for-a-better-coding-experience-part-2--21cm</link>
      <guid>https://dev.to/hamza777/awesome-vscode-extensions-for-a-better-coding-experience-part-2--21cm</guid>
      <description>&lt;p&gt;Imagine yourself typing all the HTML boilerplate code when you decided to make a new project or imagine not being able to recall the name of that single property in css and searching the web for it. Why am I talking about all this? It's obvious because this kind of stuff would really suck. So, that brings us to the wonderful extensions that we have in vscode made by a lot of people and you can use them for free.&lt;/p&gt;

&lt;p&gt;What are vscode extensions anyway?&lt;/p&gt;

&lt;p&gt;VSCode extensions let you add debuggers and various tools to your environment and works through various custom settings that the extensions bring with them.&lt;/p&gt;

&lt;p&gt;VSCode extensions are a great way to reduce your workload and make it easy for you to write your code and format it. You can even create your own vscode extensions but we won't talk about it here. There are a lots of extensions available on vscode as of today but I will mention some of which I find really useful.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;1. ES7 React/Redux/GraphQl/React-Native Snippets:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This extension right here is something else altogether 🤯, it consists of such a wide variety of code snippets, and yes for all the technologies mentioned in the title itself. If you really want to get all your work done quicker do check this one out.&lt;/p&gt;

&lt;p&gt;Some snippets:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;imp -&amp;gt; import moduleName from 'module'&lt;/p&gt;

&lt;p&gt;imrse -&amp;gt; import React, { useState, useEffect } from 'react'&lt;/p&gt;

&lt;p&gt;graphql -&amp;gt; import { compose, graphql } from react-apollo'&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And not only these but it also provides snippets for react components:&lt;/p&gt;

&lt;p&gt;rafce -&amp;gt; ( will give you 👇 )&lt;/p&gt;

&lt;p&gt;import React from 'react'&lt;/p&gt;

&lt;p&gt;const $1 = () =&amp;gt; {&lt;br&gt;
  return &lt;/p&gt;$0&lt;br&gt;
}

&lt;p&gt;export default $1&lt;/p&gt;

&lt;p&gt;and a lot lot more...&lt;br&gt;
Check for the link at the end of the post.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;2. HTML Snippets:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;HTML snippets extensions is one of the most helpful extension as provides HTML5 tags, colorization to HTML tags and also various snippets. Noe it's functionality has been absorbed into the VSCode main HTML extension. But in any case this something really helpful.&lt;/p&gt;

&lt;p&gt;You just have to type the tag name and press tab and it generates the tag for:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;button (press tab) -&amp;gt; &amp;lt;button&amp;gt;&amp;lt;/button&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;button.btn#btn-round (press tab) -&amp;gt; &amp;lt;button class="btn" id="btn-round"&amp;gt;&amp;lt;/button&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K1XOgcge--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/urv0h28ia1idjl9vquy5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K1XOgcge--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/urv0h28ia1idjl9vquy5.gif" alt="HTML Snippets" width="800" height="566"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check for the link at the end of the post.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;3. JavaScript ES6 Code Snippets:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As we have been seeing above, this one is not any different other than the fact that extension provides snippets for javascript and some really helpful one's at that. Do check it out.&lt;/p&gt;

&lt;p&gt;Here are some helpful snippets:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;fre -&amp;gt; array.forEach(currentItem =&amp;gt; {})&lt;/p&gt;

&lt;p&gt;fof -&amp;gt; for(const item of object) {}&lt;/p&gt;

&lt;p&gt;cas -&amp;gt; console.assert(expression, object)&lt;/p&gt;

&lt;p&gt;clg -&amp;gt; console.log(object)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5dCoO5Vr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zvvels1t0svc5pf1oo1a.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5dCoO5Vr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zvvels1t0svc5pf1oo1a.gif" alt="JavaScript ES6 Code Snippets" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check for the link at the end of the post.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;4. Live Sass Compiler:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here's a really amazing extension that can convert sass/scss into css and on top of that it even goes on and supports live browser reload. Generally there are other ways to compile sass/scss into css like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;sass --watch input.scss output.css&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What the command above will do is, it will watch your sass/scss input file and convert into a css output file. Here, input.scss is the name of input file and output is the name of the resultant css file.&lt;/p&gt;

&lt;p&gt;But Live Sass Compiler changes it all with just a single click sass/scss compiling initiation with custom settings. You just have to create a sass/scss file and click the button in bottom right saying (Watch Sass).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LD7lraAV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2paf36irgryobng2k9h5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LD7lraAV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2paf36irgryobng2k9h5.png" alt="Live Sass Compiler" width="800" height="101"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are my settings for scss compilation, open settings and paste this piece of code in settings.json file:&lt;/p&gt;

&lt;p&gt;"liveSassCompile.settings.formats": [&lt;br&gt;
    {&lt;br&gt;
         "format": "expanded",&lt;br&gt;
         "extensionName": ".css",&lt;br&gt;
         "savePath": "/css"&lt;br&gt;
    },&lt;br&gt;
    {&lt;br&gt;
         "format": "compressed",&lt;br&gt;
         "extensionName": ".min.css",&lt;br&gt;
         "savePath": "/css"&lt;br&gt;
    }&lt;br&gt;
],&lt;br&gt;
"liveSassCompile.settings.generateMap": false,&lt;/p&gt;

&lt;p&gt;Check for the link at the end of the post.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;5. Markdown Preview Enhanced:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Markdown Preview Enhanced is an extension that gives you the ability to look at the preview at your markdown code, and you don't even have to switch between vscode and browser for it. The preview window appears right beside the .md file with just a click or a shortcut ( cmd-k v or ctrl-k v ).&lt;/p&gt;

&lt;p&gt;It looks something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_DQPMAa7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dinoceqi3ba6tpzz0wnu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_DQPMAa7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dinoceqi3ba6tpzz0wnu.png" alt="Markdown Preview Enhanced" width="800" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To explore more and download these extensions visit here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets"&gt;ES7 React/Redux/GraphQl/React-Native Snippets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=abusaidm.html-snippets"&gt;HTML Snippets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=xabikos.JavaScriptSnippets"&gt;JavaScript ES6 Code Snippets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.live-sass"&gt;Live Sass Compiler&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced#:~:text=Markdown%20Preview%20Enhanced%20is%20an,or%20%E5%BE%AE%E4%BF%A1%E6%94%AF%E4%BB%98%20Wechat%20Pay."&gt;Markdown Preview Enhanced&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>productivity</category>
      <category>vscode</category>
      <category>programming</category>
    </item>
    <item>
      <title>Awesome VSCode extensions for a better coding experience [ Part 1 ]</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Sat, 04 Jun 2022 07:54:21 +0000</pubDate>
      <link>https://dev.to/hamza777/awesome-vscode-extensions-for-a-better-coding-experience-part-1--35pj</link>
      <guid>https://dev.to/hamza777/awesome-vscode-extensions-for-a-better-coding-experience-part-1--35pj</guid>
      <description>&lt;p&gt;Imagine yourself typing all the HTML boilerplate code when you decided to make a new project or imagine not being able to recall the name of that single property in css and searching the web for it. Why am I talking about all this? It's obvious because this kind of stuff would really suck. So, that brings us to the wonderful extensions that we have in vscode made by a lot of people and you can use them for free.&lt;/p&gt;

&lt;p&gt;What are vscode extensions anyway?&lt;/p&gt;

&lt;p&gt;VSCode extensions let you add debuggers and various tools to your environment and works through various custom settings that the extensions bring with them.&lt;/p&gt;

&lt;p&gt;VSCode extensions are a great way to reduce your workload and make it easy for you to write your code and format it. You can even create your own vscode extensions but we won't talk about it here. There are a lots of extensions available on vscode as of today but I will mention some of which I find really useful.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;1. Auto Close Tag:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As you can probably figure out from the name here this extension automatically closes the HTML/XML opening tags you write. You can customize or change the settings from the vscode auto close tag settings.&lt;br&gt;
It can even be used to close the self closing tags in HTML.&lt;/p&gt;

&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxwgs7zwzi13bqlguqjif.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxwgs7zwzi13bqlguqjif.gif" alt="Auto Close Tag"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;2. Auto Rename Tag:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This very extension lets you rename both the opening and the closing tag at once saving you the pain of renaming the tags one by one.&lt;/p&gt;

&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fix2qhh1ykrcudrisciol.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fix2qhh1ykrcudrisciol.gif" alt="Auto Rename Tag"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;3. Bracket Pair Colorizer:&lt;/em&gt; ( Now integrated into VSCode )&lt;/p&gt;

&lt;p&gt;This extension colors bracket pairs based on their positioning in the code i.e. bracket pairs adjacent to each other will have different set of color from each other.&lt;/p&gt;

&lt;p&gt;This makes the code look really clean and makes it easy to figure out the block of code you want to go to.&lt;/p&gt;

&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhlowfxqsmbh9j83c8ewq.jpg" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhlowfxqsmbh9j83c8ewq.jpg" alt="Bracket Pair Colorizer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;4. Indent Rainbows:&lt;/em&gt; ( Now integrated into VSCode )&lt;/p&gt;

&lt;p&gt;This extension is not all that different from the Bracket Pair Colorizer, just that it does the same with levels of indentations which can prove to be helpful in a language like python.&lt;/p&gt;

&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn0eh2rsmjybtnmuc3mu4.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn0eh2rsmjybtnmuc3mu4.png" alt="Indent Rainbows"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;5. Live Server:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Not much needs to be said about one of the most popular and useful extensions of all in &lt;strong&gt;VSCode&lt;/strong&gt; where you can see live previews and changes of your work with just a single click.&lt;/p&gt;

&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9fdsh89duovgb9luf8v1.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9fdsh89duovgb9luf8v1.gif" alt="Live Server"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To explore more and download these extensions visit here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag" rel="noopener noreferrer"&gt;Auto Close Tag&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag" rel="noopener noreferrer"&gt;Auto Rename Tag&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer" rel="noopener noreferrer"&gt;Bracket Pair Colorizer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow" rel="noopener noreferrer"&gt;Indent Rainbow&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>vscode</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>CSS short-hands all the time, a good idea?</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Fri, 03 Jun 2022 13:25:25 +0000</pubDate>
      <link>https://dev.to/hamza777/css-short-hands-all-the-time-a-good-idea-2h7p</link>
      <guid>https://dev.to/hamza777/css-short-hands-all-the-time-a-good-idea-2h7p</guid>
      <description>&lt;p&gt;Yes yes, I know we all love using shorthand properties wherever we can while writing our CSS, but have you ever considered about the possibilities where you were trying to get something done, set a certain property on a certain element and you would just end up seeing either no results or something totally unwanted? Well I have, a lot of times but I didn't figure it out until very recently when I was just scrolling down the YouTube homepage and I came across a video from "&lt;strong&gt;Kevin Powell&lt;/strong&gt;", I believe a lot of you know him and he made a specific video on how using shorthand properties sometimes can result in unnecessary headache.&lt;/p&gt;

&lt;p&gt;Lets get into some of the examples:&lt;/p&gt;

&lt;h3&gt;
  
  
  Margin:
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;margin: 0&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As we all know it is a shorthand for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;margin-top&lt;/li&gt;
&lt;li&gt;margin-right&lt;/li&gt;
&lt;li&gt;margin-bottom&lt;/li&gt;
&lt;li&gt;margin-left&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/hamza-777/embed/MWQXVWL?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the example above if you see the code properly I intended to have a top and bottom margin of 1rem for both text fields but due to the .center class being after the .text class its properties take priority and the margin top and bottom become 0.&lt;/p&gt;

&lt;p&gt;A possible solution is to use the individual properties:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/hamza-777/embed/abqKYwd?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;But if you find doing this inconvenient the there is another better solution at your disposal as you can see in the example below:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/hamza-777/embed/wvyXmqE?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Here you have now seen two new properties or maybe you are already familiar with these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;margin-inline:

&lt;ul&gt;
&lt;li&gt;Handles margin on the horizontal axis.&lt;/li&gt;
&lt;li&gt;Is a shorthand for:

&lt;ul&gt;
&lt;li&gt;margin-inline-start&lt;/li&gt;
&lt;li&gt;margin-inline-end&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;margin-block 

&lt;ul&gt;
&lt;li&gt;Handles margin on the vertical axis&lt;/li&gt;
&lt;li&gt;Is a shorthand for:

&lt;ul&gt;
&lt;li&gt;margin-block-start&lt;/li&gt;
&lt;li&gt;margin-block-end&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also, padding is kind of similar shorthand property so keep in  mind to use individual properties when needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Background:
&lt;/h3&gt;

&lt;p&gt;Now, just like margin property background property is a shorthand too but it is a shorthand for a bunch of other properties which can sometimes lead to unintended results, one such situation could be when you are trying to add an image as a background but you already have another class that sets:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;background: #111&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This can sometimes be problematic as it will set all other individual properties to initial value. Also I won't go deep into this topic as people prefer to do things their own way and some even prefer using frameworks instead of writing their own CSS.&lt;/p&gt;

&lt;p&gt;Here's the link to the YouTube video if you want to be evn clear about this topic:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=iGkK-5il6Mk"&gt;Kevin Powell CSS Shorthands&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Style your jupyter notebook</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Sun, 15 Aug 2021 07:21:55 +0000</pubDate>
      <link>https://dev.to/hamza777/style-your-jupyter-notebook-4ddo</link>
      <guid>https://dev.to/hamza777/style-your-jupyter-notebook-4ddo</guid>
      <description>&lt;p&gt;Hello Everyone, Today I will talk about how you can style your jupyter notebook and make it look the way you prefer. If you are a python programmer, jupyter notebook is an awesome platform. If you want jupyter notebook on your system, you can either install Anaconda Navigator or just directly install jupyter notebook on your system.&lt;br&gt;
So, after you are done setting up jupyter notebook on your system you need to navigate to the following path in your system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\{username}\.jupyter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here username can be your name, you all know what that is any way.&lt;br&gt;
Now, here you might see a folder named custom which consists of a custom.css file or you may not. But do not panic you can always create a custom folder with a custom.css file on your own. Make sure you do not change the names of folders and files.&lt;/p&gt;

&lt;p&gt;Here are some specifiers to keep in mind:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#notebook-container : can be used to style the container of input boxes.
.notebook_app : class name of the whole body of the app.
body &amp;gt; #header : controls the styling of the header.
.navbar-default : controls styling of the navbar.
.navbar-default .navbar-nav &amp;gt; li &amp;gt; a : styling links in navbar
#kernel_indicator : styling the kernel indicator.
div.input_area : styling the input area
div.cell : styles the cell containing the input area
.dropdown-menu : styles the dropdown menus of the navigation links.
div.output_wrapper : styles the output wrapper
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, let's get started. Now I will walk you through some css that you can apply to your jupyter notebook.&lt;/p&gt;

&lt;h3&gt;
  
  
  Style the Container of all the input areas
&lt;/h3&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#notebook-container{
    box-shadow: none !important;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here I have just removed the box shadow of the container but you can do your own kind of styling like giving it a border-radius or something.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnx7avxhshjuv246j69y.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnx7avxhshjuv246j69y.png" alt="container"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  You can change the appearance the whole page itself using the following selector
&lt;/h3&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.notebook_app {
    background: #fff !important;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here I just made the whole body's background to white but you can do your own styling.&lt;/p&gt;

&lt;h3&gt;
  
  
  You can style the header using the following code
&lt;/h3&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body &amp;gt; #header {
    background:  #000;
    color: #fff;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I changed the color of the header to black and the font color to white link in the picture below.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F866ufuqq1ahcja6weios.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F866ufuqq1ahcja6weios.png" alt="header"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  You can personalize the navbar using the code below
&lt;/h3&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.navbar-default {
    background: none;
    border: none;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5phaldzpj4ebxed0eq6p.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5phaldzpj4ebxed0eq6p.png" alt="nav"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  If you are looking to style the links inside the navbar then this is the way to do it
&lt;/h3&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.navbar-default .navbar-nav &amp;gt; li &amp;gt; a, #kernel_indicator {
    color: rgba(255, 255, 255, 0.25);
    border-bottom: 2px solid #f57b00;
    transition: all 0.25s;
}

.navbar-default .navbar-nav &amp;gt; li &amp;gt; a:hover, #kernel_indicator:hover {
    border-bottom: 2px solid #fff;
    color: rgba(255, 255, 255, 1);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Well this piece of code also styles the kernel_indicator which you can see on the right end with python written inside it.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffj7jkt4ukulc97rnpd1c.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffj7jkt4ukulc97rnpd1c.png" alt="nav links"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Style the input area and the cell that contains it
&lt;/h3&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div.input_area {
    border: none;
    border-radius: 0;
    background: #f7f7f7;
    line-height: 1.5em;
    margin: 0.5em 0;
    padding: 0;
}

div.cell {
    transition: all 0.25s;
    border: none;
    position: relative;
    top: 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See the changes in the picture below&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F85eb4uqr6ag81dtng86j.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F85eb4uqr6ag81dtng86j.png" alt="Input Area"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Style the dropdown menus
&lt;/h3&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.dropdown-menu {
    z-index: 999999 !important;
    background-color: #000;
    color: #fff;
    opacity: 0.95;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr9ysaplddu8zwhaupgb4.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr9ysaplddu8zwhaupgb4.png" alt="dropdown"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There's a lot more to it.&lt;br&gt;
I know what I did doesn't look all that awesome but hey, now that you know how, you can do much more.&lt;br&gt;
Here's the full CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/*This file contains any manual css for this page that needs to override the global styles.
This is only required when different pages style the same element differently. This is just
a hack to deal with our current css styles and no new styling should be added in this file.*/

#ipython-main-app {
    position: relative;
}

#jupyter-main-app {
    position: relative;
}

#notebook-container{
    box-shadow: none !important;
}

.container {
    width: 80% !important;
}

.notebook_app {
    background: #fff !important;
}

body &amp;gt; #header {
    background:  #000;
    color: #fff;
}

.navbar-default {
    background: none;
    border: none;
}

.navbar-default .navbar-nav &amp;gt; li &amp;gt; a, #kernel_indicator {
    color: rgba(255, 255, 255, 0.25);
    border-bottom: 2px solid #f57b00;
    transition: all 0.25s;
}

.navbar-default .navbar-nav &amp;gt; li &amp;gt; a:hover, #kernel_indicator:hover {
    border-bottom: 2px solid #fff;
    color: rgba(255, 255, 255, 1);
}

div.input_area {
    border: none;
    border-radius: 0;
    background: #f7f7f7;
    line-height: 1.5em;
    margin: 0.5em 0;
    padding: 0;
}

div.cell {
    transition: all 0.25s;
    border: none;
    position: relative;
    top: 0;
}

div.cell.selected, div.cell.selected.jupyter-soft-selected {
    border: none;
    background: transparent;
    box-shadow: 0 6px 18px #aaa;
    z-index: 10;
    top: -10px;
}


div#pager {
    opacity: 0.85;
    z-index: 9999;
}

.navbar-default .navbar-nav &amp;gt; .open &amp;gt; a, .navbar-default .navbar-nav &amp;gt; .open &amp;gt; a:hover, .navbar-default .navbar-nav &amp;gt; .open &amp;gt; a:focus {
    color: #fff;
    background-color: transparent;
    border-bottom: 2px solid #fff;
}

.dropdown-menu {
    z-index: 999999 !important;
    background-color: #000;
    color: #fff;
    opacity: 0.95;
}

.dropdown-menu &amp;gt; li &amp;gt; a {
    color: #fff;
}

.dropdown-menu &amp;gt; .disabled &amp;gt; a, .dropdown-menu &amp;gt; .disabled &amp;gt; a:hover, .dropdown-menu &amp;gt; .disabled &amp;gt; a:focus {
    color: rgba(255, 255, 255, 0.25);
}

.navbar-nav &amp;gt; li &amp;gt; .dropdown-menu {
    border: none;
    box-shadow: none;
}

div.output_wrapper {
    background: #eee;
}

div.cell.unselected div.output_area{
    box-shadow: inset 0 0 25px #aaa;
    padding: 1em 0;
    overflow-x: auto;
    transition: all 0.25s;
}

div.cell.selected .output_area {
    box-shadow: inset 0 0 5px #aaa;
    padding: 0.5em 0;
    overflow-x: auto;
}

div.cell.selected .div.output_scroll {
    box-shadow: none;
}

div.output_wrapper {
    margin: 0 0 1em;
    transition: all 0.25s;
}

div.cell.selected .output_wrapper {
    margin: 0;
}

.dataframe {
    background: #fff;
    box-shadow: 0px 1px 2px #bbb;
}

.dataframe thead th, .dataframe tbody td {
    text-align: right;
    padding: 1em;
}

.output, div.output_scroll {
    box-shadow: none;
}

.rendered_html pre code {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-left: 3px solid #2a7bbd;
    color: #444;
    page-break-inside: avoid;
    font-family: monospace;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 1.6em;
    max-width: 100%;
    overflow: auto;
    padding: 1em 1.5em;
    display: block;
    word-wrap: break-word;
}

h1, .h1 {
    font-size: 33px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 2.5em !important;
    color: #2a7bbd;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>jupyter</category>
      <category>python</category>
    </item>
    <item>
      <title>How I Scraped Anime Filler List Website to get list of episodes of anime</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Sun, 15 Aug 2021 06:49:26 +0000</pubDate>
      <link>https://dev.to/hamza777/how-i-scraped-anime-filler-list-website-to-get-list-of-episodes-of-anime-3042</link>
      <guid>https://dev.to/hamza777/how-i-scraped-anime-filler-list-website-to-get-list-of-episodes-of-anime-3042</guid>
      <description>&lt;p&gt;At the start of this year I was learning Web Development, mainly ( HTML, CSS, JavaScript ) and I wanted to make projects to get a better understanding of concepts. Since I loved watching anime at that time, I thought it would be a great idea to make a clone of 'Anime Filler Website'. So, I started working on it. But instead of using an API ( or I couldn't find one ) I went along with the idea of scraping Anime Filler Website for the details I needed.&lt;/p&gt;

&lt;p&gt;Here's how I did it:&lt;/p&gt;

&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqxmfxgx9lqhzdyexkedm.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqxmfxgx9lqhzdyexkedm.png" alt="Libraries"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are the libraries I used. I used 'requests' to send request to the required website and get the response back along with the required data. I used 'bs4' (BeautifulSoup) so that we can parse the data that we got from the request.  I used the library 'json' to convert python array of objects into json array of objects. And lastly I used 'shutil' to move the json file from one location to another.&lt;/p&gt;

&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ef0leoa27ghhdb40hqc.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ef0leoa27ghhdb40hqc.png" alt="Anime List"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here I created a list of anime that I wanted to get the episode list of. It is a big list so I did not mention all the name in the image.&lt;/p&gt;

&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpqgil4puwwjv1ew7kytu.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpqgil4puwwjv1ew7kytu.png" alt="Source Code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The function getJsons() in the above image is the main program. It takes the name of the anime as in the website as a parameter. It then makes a request to the website and gets back a response which is then stored in the variable 'result'. Then using bs4 it converts the text data inside result to a parsable data and stores it inside the variable 'soup'. Then we are free to select whichever HTML tag we want from the variable soup using soup.select() and then filtering the arrays to get only the text inside the HTML tags.&lt;br&gt;
Then it initializes an array so that we can store our python objects inside it. Loops throuhgh the list of the textContents and checks if the selected episode is a filler, if it is a filler then adds an HTML class 'red' as a class in the object else add a class 'green'. Stores all the data under required titles in the object and then finally appends the object to the array.&lt;br&gt;
It then converts the resultant array into a json array of bbjects using library 'json'. It then makes a file with anime-name.json and stores our array inside it.&lt;br&gt;
Finally using library 'shutil' it moves the json file from current directory to where we want it.&lt;/p&gt;

&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3gdi1pzo0xzsxhkh10ed.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3gdi1pzo0xzsxhkh10ed.png" alt="run"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We run this function for all the anime in the anime list.&lt;br&gt;
Thank You!! Hope you learned something from the post.&lt;br&gt;
Here is the link to the github repo of my project &lt;a href="https://github.com/Hamza-777/AnimVille" rel="noopener noreferrer"&gt;AnimVille&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>jupyter</category>
    </item>
  </channel>
</rss>
