<?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: Arbaoui Mehdi</title>
    <description>The latest articles on DEV Community by Arbaoui Mehdi (@arbaoui_mehdi).</description>
    <link>https://dev.to/arbaoui_mehdi</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%2F123608%2F0cc79da2-b31d-48cb-92be-90fc744c0ab1.jpg</url>
      <title>DEV Community: Arbaoui Mehdi</title>
      <link>https://dev.to/arbaoui_mehdi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arbaoui_mehdi"/>
    <language>en</language>
    <item>
      <title>Front-end HTML/CSS Coding Challenges Tool</title>
      <dc:creator>Arbaoui Mehdi</dc:creator>
      <pubDate>Tue, 26 Sep 2023 12:59:45 +0000</pubDate>
      <link>https://dev.to/arbaoui_mehdi/rise-to-the-challenge-master-htmlcss-effectively-with-divizeio-3k8</link>
      <guid>https://dev.to/arbaoui_mehdi/rise-to-the-challenge-master-htmlcss-effectively-with-divizeio-3k8</guid>
      <description>&lt;p&gt;As a Frontend Engineer, I often navigated the complexities of HTML and CSS alongside my partner, a Backend Developer. We frequently discussed the common challenges many face in mastering these languages, noting a significant gap between theoretical knowledge and practical experience in writing effective and accessible code for real-world interfaces.&lt;/p&gt;

&lt;p&gt;This led to the birth of &lt;strong&gt;&lt;a href="https://divize.io/challenges" rel="noopener noreferrer"&gt;divize.io&lt;/a&gt;&lt;/strong&gt;, a concept born from our brainstorming. Unlike typical tutorials or guides, the platform we made is envisioned as a practical, interactive space for individuals to enhance their HTML and CSS skills by working on real-world user interfaces. During its development, we emphasized a structured learning path, ensuring users build interfaces from scratch while adhering to industry best practices. This approach guarantees a solid foundation and a profound understanding of HTML and CSS, moving beyond the theoretical learning offered elsewhere.&lt;/p&gt;

&lt;p&gt;Now, let's delve into the main features of the tool:&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;1 - Inspect and Highlight&lt;/li&gt;
&lt;li&gt;2 - Timed Challenges&lt;/li&gt;
&lt;li&gt;3 - Reset a Challenge&lt;/li&gt;
&lt;li&gt;4 - Copy-Paste Prohibited&lt;/li&gt;
&lt;li&gt;5 - Responsive Controls&lt;/li&gt;
&lt;li&gt;6 - UI analyzer&lt;/li&gt;
&lt;li&gt;7 - MDN Reference&lt;/li&gt;
&lt;li&gt;8 - UI Matchup&lt;/li&gt;
&lt;li&gt;9 - Emmet Support&lt;/li&gt;
&lt;li&gt;10 - Advanced Mode&lt;/li&gt;
&lt;li&gt;11 - Accessibility Steps&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  # 1 Inspect and Highlight &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F2co3ihpi6rjpa957q47u.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F2co3ihpi6rjpa957q47u.jpeg" alt="Inspect &amp;amp; Highlight the User Interface Challenge Elements" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The UI Inspector is a convenient feature that allows users to interactively examine and dissect elements within a user interface preview by clicking on the dedicated button in the top bar. Easily toggled on and off, it provides valuable insights into the UI's structure and can be disabled for seamless text selection without any disruptions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inspect elements from the UI Preview
&lt;/h3&gt;

&lt;p&gt;To enable the UI inspector, toggle the &lt;code&gt;inspector button&lt;/code&gt; on the top bar. This feature allows you to inspect elements using your mouse directly from the user interface preview. It offers a clear understanding of how the UI is decomposed. If you prefer to disable the UI inspector, simply click the button again. This can be useful if you want to select text from the UI without interference from the inspector.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F3lmmxke7uz7rogxfwox9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F3lmmxke7uz7rogxfwox9.jpg" alt="Inspect User Interface Elements from the UI itself" width="800" height="746"&gt;&lt;/a&gt;Inspect User Interface Elements from the UI itself&lt;br&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Inspect from the Tree Viewer
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;tree viewer&lt;/code&gt; displays all elements of a user interface according to their parent, child, and sibling structure. By hovering over each element in the tree viewer, the corresponding element in the UI preview will be highlighted. This feature helps you visualize the UI's structure, enabling you to make informed decisions about semantic elements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fyrr7jk1jxd0ju9v7zs8r.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fyrr7jk1jxd0ju9v7zs8r.jpg" alt="Inspect User Interface Elements from the Tree" width="800" height="858"&gt;&lt;/a&gt;Inspect User Interface Elements from the Tree&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  # 2 Timed Challenges &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fxvc1emlbiqoc3yy4tpqd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fxvc1emlbiqoc3yy4tpqd.jpg" alt="Timed HTML/CSS Challenges" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Deadline-Driven Scoring System is an engaging feature that fosters a sense of urgency and encourages efficient learning. By setting time-sensitive goals, it motivates you to tackle challenges more effectively, ultimately boosting your HTML and CSS skills in the process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Goal time and how it affects the score
&lt;/h3&gt;

&lt;p&gt;The new deadline feature provides a dynamic scoring system for each challenge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Finish within the goal time&lt;/strong&gt;: Earn your challenge score plus a bonus.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finish after the goal time&lt;/strong&gt;: Earn your challenge score, without the bonus.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finish after the deadline&lt;/strong&gt;: Earn less than the challenge score, without the bonus.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't finish the challenge&lt;/strong&gt;: Receive no score.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fo1s2ri8u97r5cl8ri7h7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fo1s2ri8u97r5cl8ri7h7.jpg" alt="Finished HTML/CSS Challenge in Time" width="800" height="858"&gt;&lt;/a&gt;Modal of the Finished Challenge in Time&lt;br&gt;&lt;/p&gt;

&lt;p&gt;This scoring system adds a competitive element to your learning experience, motivating you to improve your HTML and CSS skills under time constraints. As a result, you'll develop the ability to work efficiently under pressure, ultimately leading to an increase in your ranking on the &lt;a href="https://divize.io/leaderboard" rel="noopener noreferrer"&gt;leaderboard&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fv54d481z7dgv4xs5nu2i.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fv54d481z7dgv4xs5nu2i.jpg" alt="Divize HTML/CSS Challengers Leaderboard" width="800" height="450"&gt;&lt;/a&gt;Challengers Leaderboard&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  # 3 Reset a Challenge &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F9bb1zm107pmgpx0785xj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F9bb1zm107pmgpx0785xj.jpg" alt="Reset an HTML/CSS Challenge" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Reset Feature enables you to restart challenges at any point, providing an opportunity to practice and refine your HTML and CSS skills more effectively. This versatile function caters to those who want to hone their abilities by attempting challenges multiple times or aiming for better scores.&lt;/p&gt;

&lt;h3&gt;
  
  
  How the Challenge Reset Feature Works
&lt;/h3&gt;

&lt;p&gt;The reset feature can be used at any phase of a challenge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;During the HTML phase, if you haven't finished it yet.&lt;/li&gt;
&lt;li&gt;After completing the HTML phase and moving to the CSS phase, if you haven't finished it yet.&lt;/li&gt;
&lt;li&gt;After finishing both HTML and CSS phases, effectively completing the challenge.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To reset a challenge, simply click the reset button in the left sidebar. This will reset your progress, the deadline countdown, and your score, allowing you to start from the beginning with a clean slate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fbofxj7xmgi7elinjpe7w.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fbofxj7xmgi7elinjpe7w.jpg" alt="Reset an HTML/CSS Divize Challenge" width="800" height="479"&gt;&lt;/a&gt;Reset an HTML/CSS Challenge&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Additionally, if you try to switch from &lt;code&gt;Assisted Mode&lt;/code&gt; to &lt;code&gt;Advanced Mode&lt;/code&gt;, you'll be prompted to reset the challenge.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reasons to Reset a Challenge
&lt;/h3&gt;

&lt;p&gt;Resetting a challenge can be beneficial for various reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Practice a challenge multiple times to enhance your learning experience.&lt;/li&gt;
&lt;li&gt;Aim for a better score by completing the challenge within the deadline.&lt;/li&gt;
&lt;li&gt;Strive for a higher score by finishing the challenge in &lt;code&gt;Advanced Mode&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  # 4 Copy-Paste Prohibited &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fb15n55yc91u50akus9pf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fb15n55yc91u50akus9pf.jpg" alt="Divize Editor Copy-Paste Prohibited" width="800" height="450"&gt;&lt;/a&gt;Divize Editor Copy-Paste Prohibited&lt;br&gt;&lt;/p&gt;

&lt;p&gt;The Editor's Copy-Paste Prevention Feature is designed to promote a hands-on learning experience by discouraging the act of copying and pasting code. This feature detects such actions, issues a warning, and necessitates a challenge reset to proceed, ultimately fostering better code-writing habits and a deeper understanding of HTML and CSS concepts.&lt;/p&gt;

&lt;h3&gt;
  
  
  How the Anti-Copy-Paste Feature Works
&lt;/h3&gt;

&lt;p&gt;When using the Divize Editor, copying and pasting external code into it is not allowed. If a student attempts to do so, they'll receive a warning indicating that they have &lt;code&gt;cheated&lt;/code&gt;, and they'll be required to reset the challenge. Failing to reset the challenge will result in a &lt;code&gt;cheated&lt;/code&gt; label being assigned to it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fzxc3vjm14wsiokhqf2bd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fzxc3vjm14wsiokhqf2bd.jpg" alt="Cheating on a Challenge Public Profile Label" width="800" height="417"&gt;&lt;/a&gt;Cheating on a Challenge Public Profile Label&lt;/p&gt;

&lt;h2&gt;
  
  
  # 5 Responsive Controls &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fb31fay9rgo7pztiqw33q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fb31fay9rgo7pztiqw33q.png" alt="User Interface Responsive Controls" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This feature enables you to adapt your user interfaces to various device sizes, such as mobile or tablet, in both portrait and landscape orientations. You can also adjust the resolution manually to test your CSS breakpoints.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Responsive Controls Work
&lt;/h3&gt;

&lt;p&gt;Using the responsive controls is simple and efficient:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click the &lt;code&gt;mobile&lt;/code&gt; or &lt;code&gt;tablet&lt;/code&gt; button in the top bar to adapt the UI to the respective resolution in portrait orientation.&lt;/li&gt;
&lt;li&gt;Click the &lt;code&gt;mobile&lt;/code&gt; or &lt;code&gt;tablet&lt;/code&gt; button again to switch the orientation to landscape.&lt;/li&gt;
&lt;li&gt;Click the &lt;code&gt;arrows&lt;/code&gt; button in the top bar to fit the UI to your browser's size.&lt;/li&gt;
&lt;li&gt;Click the &lt;code&gt;pencil&lt;/code&gt; button to reveal a dropdown where you can set your preferred width manually.&lt;/li&gt;
&lt;li&gt;To adjust the &lt;code&gt;width&lt;/code&gt; manually, drag the element on the right side of the UI, and it will adapt to the position where you stop dragging.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fct3inwemzcd4b3tgdhvs.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fct3inwemzcd4b3tgdhvs.jpg" alt="Adjust the Width of a Responsive Challenge" width="800" height="558"&gt;&lt;/a&gt;Adjust the Width of a Responsive Challenge&lt;/p&gt;

&lt;h2&gt;
  
  
  # 6 UI Analyzer &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fg67fkbhr2dd2mmy9g0k1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fg67fkbhr2dd2mmy9g0k1.jpg" alt="User Interface HTML used Tags and CSS used Properties" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Semantics Analyzer and CSS Properties Analyzer features provide guidance on appropriate semantic tags and CSS properties for UI elements, helping users expand their HTML/CSS knowledge and develop better user interfaces.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enhancing Your Learning Experience with the UIs Code Analyzer Features
&lt;/h3&gt;

&lt;p&gt;The Semantics Analyzer and CSS Properties Analyzer features offer several benefits for an effective learning experience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand the correct semantic tags to use for specific UI elements, such as breadcrumbs using &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;ol&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Access a comprehensive list of HTML tags and their references for easy reference.&lt;/li&gt;
&lt;li&gt;Receive a summary of the HTML tags and CSS properties required to complete a challenge successfully.&lt;/li&gt;
&lt;li&gt;Discover new HTML tags and CSS property implementations to expand your HTML/CSS knowledge.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How to Use the Semantics and CSS Properties Analyzer Features
&lt;/h3&gt;

&lt;p&gt;After choosing a challenge, you'll find a button with the corresponding language logo near the editor. In the HTML phase, click on the &lt;code&gt;HTML logo button&lt;/code&gt; next to the instructions to display a list of tags for the challenge. Select the semantically correct tags for each element, and click on individual tags to view a brief definition and a reference link for further information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Futm2e1au8bm80w3bk3k2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Futm2e1au8bm80w3bk3k2.jpg" alt="Divize Editor - User Interface HTML Tags" width="800" height="546"&gt;&lt;/a&gt;User Interface Challenge HTML Tags&lt;/p&gt;

&lt;p&gt;During the CSS phase, click on the &lt;code&gt;CSS logo button&lt;/code&gt; to see a list of the required CSS properties to complete the challenge. Each property is clickable, displaying its definition and a link to its reference and implementation details.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F484fxwbgqyo13mrlcwr8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F484fxwbgqyo13mrlcwr8.jpg" alt="Divize Editor - User Interface CSS Properties" width="800" height="546"&gt;&lt;/a&gt;User Interface Challenge CSS Properties&lt;/p&gt;

&lt;h2&gt;
  
  
  # 7 MDN Reference &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fkj7ex0gu0zxatv3ian9e.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fkj7ex0gu0zxatv3ian9e.jpg" alt="MDN integrated HTML/CSS References" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The UI Analysis feature goal is to enhance learning by displaying a list of HTML tags and CSS properties for each challenge. Integrated with the &lt;a href="https://divize.io/doc" rel="noopener noreferrer"&gt;MDN reference&lt;/a&gt;, it offers direct access to implementation details, facilitating a better understanding and application of HTML and CSS. Furthermore, the Divize MDN Guide pages serve as a centralized resource, allowing you to conveniently search and find references to HTML tags and CSS properties all in one location.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Use the UI Analysis Feature
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Locate the &lt;code&gt;HTML logo&lt;/code&gt; or &lt;code&gt;CSS logo&lt;/code&gt; button next to the instructions tab.&lt;/li&gt;
&lt;li&gt;Click on the button to reveal a list of HTML tags or CSS properties.&lt;/li&gt;
&lt;li&gt;Choose the HTML tag or CSS property you're interested in, which will open a short description containing a &lt;code&gt;reference link&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F8s2oix0f7x3y5u7emcn5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F8s2oix0f7x3y5u7emcn5.png" alt="Divize HTML/CSS MDN Reference" width="800" height="549"&gt;&lt;/a&gt;HTML MDN Reference&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on the &lt;code&gt;reference link&lt;/code&gt; to visit its reference page with detailed implementation information from MDN.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F5w24e62ktgx86iyk1687.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F5w24e62ktgx86iyk1687.jpg" alt="Divize HTML/CSS MDN Reference" width="800" height="494"&gt;&lt;/a&gt;CSS MDN Reference&lt;/p&gt;

&lt;h2&gt;
  
  
  # 8 UI Matchup &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F65t7whth2t85wga07qqs.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F65t7whth2t85wga07qqs.jpg" alt="User Interface Matchup Preview" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The UI Comparison Feature allows you to visually compare your progress with the provided preview while tackling User Interface challenges, ensuring your work aligns with the intended design. This helpful addition assists you in achieving accurate and effective results.&lt;/p&gt;

&lt;h3&gt;
  
  
  How the UI Comparison Feature Works
&lt;/h3&gt;

&lt;p&gt;The UI comparison feature is enabled by default and can be controlled using a toggle on the topbar. Here's how to use it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start a new UI Challenge.&lt;/li&gt;
&lt;li&gt;Ensure the UI comparison feature is enabled by checking the toggle on the topbar.&lt;/li&gt;
&lt;li&gt;To compare your work with the preview, simply drag the "mirror" slider from left to right. This will reveal the preview of the intended design.&lt;/li&gt;
&lt;li&gt;Drag the slider from right to left to view your work and assess your progress.&lt;/li&gt;
&lt;li&gt;If you prefer to disable the UI comparison feature, simply toggle it off from the topbar.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F0lnt5ru3adekmwln5h3e.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F0lnt5ru3adekmwln5h3e.gif" alt="Compare the HTML/CSS Challenge Preview with the Student Result" width="800" height="578"&gt;&lt;/a&gt;Compare the HTML/CSS Challenge Preview with the Student Result&lt;/p&gt;

&lt;h2&gt;
  
  
  # 9 Code Editor Emmet Support &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fp9cc5sjco2ghnsbhx6zc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fp9cc5sjco2ghnsbhx6zc.jpg" alt="Divize Editor HTML Emmet Support" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Emmet integration is a powerful feature that allows you to create HTML and CSS code more efficiently using short expressions. This enhancement promotes a DRY (Don't Repeat Yourself) approach and reduces repetition, resulting in an improved user experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Does Emmet Work in the Divize Editor?
&lt;/h3&gt;

&lt;p&gt;Emmet is a powerful and widely-used toolkit that allows developers to generate and manipulate HTML code with a variety of expressions. These expressions can be used to perform a range of operations on HTML code, including creating new elements, nesting them within other elements, adding attributes to elements, and more:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{} adding text
[] adding attribute
&amp;gt; child element
^ up one element
* multiplication
$ automatic numbering
+ sibling
() grouping
. add class
# add ID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With these expressions, you can quickly generate HTML structures and improve your workflow while progressing through &lt;a href="https://divize.io/challenges" rel="noopener noreferrer"&gt;challenges&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Simple Example of Using Emmet in our Editor
&lt;/h3&gt;

&lt;p&gt;Consider this Emmet code, which generates a basic HTML structure with a &lt;code&gt;main&lt;/code&gt; section, a &lt;code&gt;header&lt;/code&gt;, a &lt;code&gt;section&lt;/code&gt; for the &lt;code&gt;main&lt;/code&gt; content, and a &lt;code&gt;footer&lt;/code&gt; with a &lt;code&gt;span&lt;/code&gt; tag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;main.container&amp;gt;h1{Header}+section&amp;gt;p{Main}+footer&amp;gt;span
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The generated HTML code will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;main&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Header&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Main&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;footer&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With Emmet integrated into Divize Editor, you can significantly speed up your coding process while reducing repetition.&lt;/p&gt;

&lt;h2&gt;
  
  
  # 10 Advanced Mode Challenges &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fkcqsmzsb7nrtzknv50kx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fkcqsmzsb7nrtzknv50kx.png" alt="Divize Advanced Editor Mode" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Advanced Mode&lt;/code&gt; feature offers an increased challenge for learners seeking to enhance their skills. Unlike Assisted Mode, where CSS properties are provided to be filled in, Advanced Mode requires users to independently interpret CSS instructions and write both the corresponding properties and values, promoting a deeper understanding and mastery.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Elements of the Advanced Mode
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;No phasing: Both HTML and CSS editors are available simultaneously, and you'll have access to instructions for both.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fcv4ngu3yq8axvcgmu1bp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fcv4ngu3yq8axvcgmu1bp.jpg" alt="Advanced Editor Mode Elements" width="800" height="275"&gt;&lt;/a&gt;Advanced Editor Mode Elements&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Higher score potential: Finishing a challenge in time in Advanced Mode will result in a higher score compared to completing it in Assisted Mode.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How to Use Advanced Mode
&lt;/h3&gt;

&lt;p&gt;To switch to Advanced Mode, click on the &lt;code&gt;Advanced Mode&lt;/code&gt; tab in the top bar. You will be prompted to reset the challenge because switching modes requires a fresh start. The countdown will restart, and any previously calculated scores for the challenge will be reset.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ftz8bup5v2kmco9paiqmw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ftz8bup5v2kmco9paiqmw.jpg" alt="Enable Divize Advanced Editor Mode" width="800" height="370"&gt;&lt;/a&gt;Enable Divize Advanced Editor Mode &lt;/p&gt;

&lt;h2&gt;
  
  
  # 11 Accessibility Steps &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;In our commitment to promoting writing more accessible HTML structures, we've introduced a feature that includes a comprehensive list of accessibility best practices. This guide aids in crafting an accessibility-friendly HTML structure, ensuring that websites and web applications are usable by everyone, including individuals with disabilities.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ffmsde6tynlhlnr5sw9zx.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ffmsde6tynlhlnr5sw9zx.jpeg" alt="Accessibility HTML Tests" width="800" height="1071"&gt;&lt;/a&gt;Accessibility HTML Tests &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In conclusion, &lt;em&gt;Divize.io&lt;/em&gt; is a practical tool for enhancing HTML and CSS skills, offering interactive challenges and real-world scenarios. It provides a straightforward approach to learning, with a focus on understanding and applying coding skills effectively. &lt;/p&gt;

&lt;p&gt;Ready for the first challenge? &lt;a href="https://divize.io/challenges/layouts/center-div/flexbox-center-alignment" rel="noopener noreferrer"&gt;Let's center a &amp;lt;div&amp;gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Video Explainer
&lt;/h2&gt;

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

</description>
      <category>html</category>
      <category>css</category>
      <category>coding</category>
      <category>learning</category>
    </item>
    <item>
      <title>A Tool for Learning to Classify CSS Selectors and Combinators</title>
      <dc:creator>Arbaoui Mehdi</dc:creator>
      <pubDate>Sun, 06 Aug 2023 09:41:57 +0000</pubDate>
      <link>https://dev.to/arbaoui_mehdi/css-selectorscombinators-classifier-3lc5</link>
      <guid>https://dev.to/arbaoui_mehdi/css-selectorscombinators-classifier-3lc5</guid>
      <description>&lt;p&gt;If you find yourself constantly struggling to categorize the numerous types of CSS selectors and combinators. I've often found myself forgetting the different classifications, which led me to create &lt;a href="//selectors.info"&gt;selectors.info&lt;/a&gt; - a tool designed to systematically organize and visualize CSS selectors and combinators by their respective types. This tool serves not only as a practical reference but also as a learning guide.&lt;/p&gt;

&lt;h2&gt;
  
  
  Write, Parse, and Classify
&lt;/h2&gt;

&lt;p&gt;Write your list of selectors and combinators, and the tool will parse and categorize them, as an example on how the HTML below will be classified accordingly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.navigation&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="nd"&gt;:last-child&lt;/span&gt; &lt;span class="nt"&gt;a&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Will be categorised like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Selectors

&lt;ul&gt;
&lt;li&gt;Class: &lt;code&gt;.navigation&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Type: &lt;code&gt;li&lt;/code&gt; and &lt;code&gt;a&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Pseudo-Class: &lt;code&gt;:last-child&lt;/code&gt; &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Combinators

&lt;ul&gt;
&lt;li&gt;Child: &lt;code&gt;&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Descendant: space&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F7ma8b1wout0gvq1tlmla.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F7ma8b1wout0gvq1tlmla.jpg" alt="Write, Parse, and Classify CSS Selectors and Combinators" width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Easy Navigation
&lt;/h2&gt;

&lt;p&gt;Once your CSS selectors are parsed and divided into categories and subcategories (e.g., &lt;code&gt;Selectors&lt;/code&gt; as a Category and &lt;code&gt;Pseudo-Class&lt;/code&gt; as a SubCategory), you can easily highlight each type within the code by clicking on a Subcategory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F1vqoy2dwxpam8p3ugwbw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F1vqoy2dwxpam8p3ugwbw.jpg" alt="Easy CSS Selectors/Combinators Navigation" width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Concise Descriptions for Every Classification
&lt;/h2&gt;

&lt;p&gt;For each selector or combinator type, it provides a brief yet informative summary, offering an insightful glimpse into its implementation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fz6ipi70t7ci6cva287tq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fz6ipi70t7ci6cva287tq.jpg" alt="CSS Selectors/Combinators types description" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tool Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Classify Selectors and Combinators:&lt;/strong&gt; Organize and visualize their types.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Understand Selector Types:&lt;/strong&gt; Includes Type Selectors, Classes, IDs, Attributes, Pseudo Classes, and Pseudo Elements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explore Attribute Types:&lt;/strong&gt; Clear definitions for specific matchers like Prefix Matcher &lt;code&gt;^=&lt;/code&gt;, Suffix &lt;code&gt;$=&lt;/code&gt;, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Combinators Type Insight:&lt;/strong&gt; Breakdown of combinators types like Descendant, Child, Next Sibling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Editor:&lt;/strong&gt; Immediate classification by Selectors, Combinators, and Attributes Types, with highlighting.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;a href="//selectors.info"&gt;selectors.info&lt;/a&gt; is a practical tool that visually categorizes selectors and combinators. It is designed to assist anyone looking to understand and organize CSS selectors and combinators better&lt;/p&gt;

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

</description>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>A tool to Make CSS Box Shadows Effortlessly</title>
      <dc:creator>Arbaoui Mehdi</dc:creator>
      <pubDate>Wed, 28 Jun 2023 17:29:00 +0000</pubDate>
      <link>https://dev.to/arbaoui_mehdi/a-tool-to-make-css-box-shadows-effortlessly-4old</link>
      <guid>https://dev.to/arbaoui_mehdi/a-tool-to-make-css-box-shadows-effortlessly-4old</guid>
      <description>&lt;p&gt;We've made &lt;a href="//boxshadows.xyz"&gt;boxshadows.xyz&lt;/a&gt; aimed at easing the process of creating and managing the &lt;code&gt;box-shadow&lt;/code&gt; property in CSS. It's designed to facilitate the creation of intricate shadow effects and accelerate design workflows with real-time previews, catering to both beginners and experienced developers alike. &lt;/p&gt;

&lt;p&gt;The tool provides comprehensive control over various parameters of the &lt;code&gt;box-shadow&lt;/code&gt; including the ability to add multiple shadows, control shadow types, adjust offsets, set blur and spread, and choose shadow colors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features of Our box-shadow Tool
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Add Multiple Box Shadows
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fa833jnu4xlsd1ag1rnv3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fa833jnu4xlsd1ag1rnv3.jpg" alt="Add Multiple CSS Box Shadows" width="800" height="320"&gt;&lt;/a&gt;&lt;br&gt;
To start with, our tool is capable of handling multiple box shadows. This is particularly handy when you want to create a more elaborate and layered shadow effect. You can easily add as many shadows as you want and create a multi-dimensional visual appeal.&lt;/p&gt;
&lt;h3&gt;
  
  
  Remove or Hide a Selected Shadow
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ffe3nlw48l1k0eluju9rs.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ffe3nlw48l1k0eluju9rs.jpg" alt="Hide, Show or Delete a CSS Box Shadow" width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The tool also offers flexibility in &lt;strong&gt;removing&lt;/strong&gt; or &lt;strong&gt;hiding&lt;/strong&gt; a shadow that you've previously added. This can be useful in experimenting with different shadow effects, or when you want to compare the look and feel of your design with and without a specific shadow.&lt;/p&gt;
&lt;h3&gt;
  
  
  Toggle the Type of Box Shadow
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fc229mmstb2v19smpj0oa.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fc229mmstb2v19smpj0oa.jpg" alt="CSS Box Shadow Type Toggle Control" width="800" height="624"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whether you want to create an &lt;strong&gt;inset&lt;/strong&gt; or &lt;strong&gt;outset&lt;/strong&gt; box shadow, our tool gives you full control over this aspect. Just a simple toggle switch can change the type of shadow, allowing you to instantly visualize the effect on your design.&lt;/p&gt;
&lt;h3&gt;
  
  
  Independent x and y Offset Control
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fnycjymmguec7r5fsjcax.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fnycjymmguec7r5fsjcax.jpg" alt="X/Y Offsets Box Shadow controls via a 2D-slider or text inputs" width="800" height="624"&gt;&lt;/a&gt;&lt;br&gt;
The &lt;strong&gt;x-offset&lt;/strong&gt; and &lt;strong&gt;y-offset&lt;/strong&gt; of the shadow can be controlled separately via an input text control. Alternatively, you can use a &lt;strong&gt;2D-Slider&lt;/strong&gt; to simultaneously update both offsets. This allows for a greater degree of precision and customization of your shadow effects.&lt;/p&gt;
&lt;h3&gt;
  
  
  Control Blur and Spread
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fgwfi1eieelg63gz1gp5t.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fgwfi1eieelg63gz1gp5t.jpg" alt="CSS Box Shadow Blur and Spread Controls" width="800" height="624"&gt;&lt;/a&gt;&lt;br&gt;
The &lt;strong&gt;blur&lt;/strong&gt; and &lt;strong&gt;spread&lt;/strong&gt; of the shadow can be manually set from an input text or adjusted using a range slider for easier control. This feature allows you to precisely define how far and how fuzzy the shadow extends from the box.&lt;/p&gt;
&lt;h3&gt;
  
  
  Shadow Color
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F2850vi95hk18unti6grb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F2850vi95hk18unti6grb.jpg" alt="CSS Box Shadow Color Control" width="800" height="624"&gt;&lt;/a&gt;&lt;br&gt;
Our tool includes a color picker to set the &lt;strong&gt;box shadow color&lt;/strong&gt;. This enables you to match the shadow color with your overall design theme or to create contrasting effects for more visual interest.&lt;/p&gt;
&lt;h3&gt;
  
  
  Control Over the Preview Canvas
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F6qlzl2umcxj5krqqdlw9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F6qlzl2umcxj5krqqdlw9.jpg" alt="Preview Size and Background Color Controls" width="800" height="624"&gt;&lt;/a&gt;&lt;br&gt;
Beyond just the &lt;code&gt;box-shadow&lt;/code&gt;, the tool provides comprehensive control over the canvas of the &lt;strong&gt;preview&lt;/strong&gt; as well. You can easily customize the &lt;code&gt;border-radius&lt;/code&gt;, &lt;code&gt;width&lt;/code&gt;, &lt;code&gt;height&lt;/code&gt;, &lt;code&gt;border-color&lt;/code&gt;, and &lt;code&gt;background-color&lt;/code&gt; of the element that holds the shadows. You can also change the &lt;code&gt;background-color&lt;/code&gt; of the canvas wrapping the element.&lt;/p&gt;
&lt;h3&gt;
  
  
  Real-Time Update of Preview, Code, and Description
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ftnjajrb4r71qe5q3r0b8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ftnjajrb4r71qe5q3r0b8.png" alt="CSS Box Shadow Code and its Description" width="800" height="646"&gt;&lt;/a&gt;&lt;br&gt;
Every modification you make using the controls is immediately reflected in the &lt;strong&gt;preview&lt;/strong&gt;, the code, and the &lt;strong&gt;description&lt;/strong&gt;. This real-time update feature helps you see the impact of your changes instantly, making it easier and faster to achieve your desired effect.&lt;/p&gt;

&lt;p&gt;The description is the block that includes all the added shadows definition, which describes what happens for each shadow &lt;code&gt;type&lt;/code&gt;, &lt;code&gt;offsets&lt;/code&gt;, &lt;code&gt;blur&lt;/code&gt;, &lt;code&gt;spread&lt;/code&gt;, and &lt;code&gt;color&lt;/code&gt; separately.&lt;/p&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This comprehensive tool provides full control of the CSS box-shadow property, making it a must-have for web designers and developers. &lt;/p&gt;

&lt;p&gt;Its intuitive interface, robust feature set, and real-time update capabilities make it incredibly efficient and enjoyable to work with. Whether you're working on a complex UIs or just learning CSS, this tool is certain to make your design process much smoother. Give it a try today and experience the difference it makes in your web design workflow!&lt;/p&gt;

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

</description>
      <category>html</category>
      <category>css</category>
      <category>uidesign</category>
      <category>productivity</category>
    </item>
    <item>
      <title>We build a tool that identifies colors from a website URL and generate a CSS/Sass code palette</title>
      <dc:creator>Arbaoui Mehdi</dc:creator>
      <pubDate>Sun, 09 Jan 2022 20:44:08 +0000</pubDate>
      <link>https://dev.to/arbaoui_mehdi/extract-colors-from-a-website-url-and-generate-a-csssass-code-palette-2jid</link>
      <guid>https://dev.to/arbaoui_mehdi/extract-colors-from-a-website-url-and-generate-a-csssass-code-palette-2jid</guid>
      <description>&lt;p&gt;As a Frontend Developer, I always asked how can I get a code color palette of a website without reaching into the dev tools, so I tried multiple browsers extensions, but the result wasn't right. We decided my work partner and me to build that tool. So we spent &lt;strong&gt;14 days&lt;/strong&gt; from prototyping into making &lt;a href="https://alwane.io" rel="noopener noreferrer"&gt;https://alwane.io&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ft6v312sgblhiob87ufwj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ft6v312sgblhiob87ufwj.jpg" alt="Sketching Alwane Components" width="800" height="541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F6geo5z4w8x15wz08kaxo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F6geo5z4w8x15wz08kaxo.jpg" alt="Alwane Tool Wireframing" width="800" height="558"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="//alwane.io"&gt;alwane.io&lt;/a&gt; is a web-based tool giving you the ability to extract colors from a website URL or an existing CSS code, regroup/order colors, then generate a palette including a CSS/Sass file. A simple and handy tool to build your next project's colors, get inspiration, and examine your website's color palette.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F3jnx6i5pglxxaqptfs44.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F3jnx6i5pglxxaqptfs44.gif" alt="Spotify Code Color Palette" width="600" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tool Description
&lt;/h2&gt;

&lt;p&gt;It's a simple web application to help you generate palettes for your projects. It uses a color sorting algorithm to gather colors from a website's CSS or any other existing CSS code and regroup them into color classes. &lt;/p&gt;

&lt;p&gt;You can then order these colors, generate a CSS or SASS code, and start using it in your project. The tool also offers some other useful features: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Colors can be extracted from an existing CSS code (the one used by the website) or from any other CSS code. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Colors can be sorted and regrouped from a list of Hexadecimal codes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Colors can be saved in sets: you can therefore create multiple lists of colors so that you can easily manage them. &lt;br&gt;
This is incredibly convenient when each set contains colors from a different website or project, and you want to keep track of everything separately.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You have complete control of the pallet, where you can remove one color or a group of colors. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  And for how we tackle color sorting
&lt;/h2&gt;

&lt;p&gt;We first extract the code by analyzing the code and pulling hexadecimal/rgb/rgba codes; as a starting point, the difference between each color is calculated using the &lt;strong&gt;Delta E CIE 2000&lt;/strong&gt; algorithm to match the colors list as closely as possible.&lt;/p&gt;

&lt;p&gt;We used Delta E as a formula that defines color difference which measures the distance between two colors in terms of their coordinates in a perceptual color space such as CIELAB or CIELUV; we used it to quantify how different two colors are. It's defined as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;∆E = (ΔL / Δa)² + (ΔC / Δb)²
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ΔL = Δa = Δc =&lt;/code&gt; the change in lightness, from one sample to the next, throughout the entire color gamut.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I hope you like the tool. I’d be happy to answer any questions, and I welcome your feedbacks.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>sass</category>
      <category>webdev</category>
      <category>uidesign</category>
    </item>
    <item>
      <title>Can you define what you do as a full-stack developer?</title>
      <dc:creator>Arbaoui Mehdi</dc:creator>
      <pubDate>Sun, 26 Sep 2021 10:44:47 +0000</pubDate>
      <link>https://dev.to/arbaoui_mehdi/can-you-define-your-job-as-a-full-stack-developer-2f82</link>
      <guid>https://dev.to/arbaoui_mehdi/can-you-define-your-job-as-a-full-stack-developer-2f82</guid>
      <description>&lt;p&gt;To begin, "full-stack" developers often find it difficult to explain what they do, "I WAS THERE!". &lt;/p&gt;

&lt;h2&gt;
  
  
  A Multitasker person
&lt;/h2&gt;

&lt;p&gt;The Full Stack developer's duties will involve creating the app's user interface, writing code, managing databases, and testing the application thoroughly; doing all of that with some accuracy, which it's NOT TRUE/UNREALISTIC.&lt;/p&gt;

&lt;p&gt;While it's correct that devs with a comprehensive set of skills are in demand, the term "full-stack developer" is often abused; in today's workplace, being a full-stack developer indicates various forms to different people.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Companies perceives the job
&lt;/h2&gt;

&lt;p&gt;Some people see the job title carrying someone who can code anything, regardless of context or language. Others adopt "full-stack," introducing developers who have little experience in various things. In the most basic sense, the job title is employed to simply means "a combination of skill sets used broadly without a narrowed thinking."&lt;/p&gt;

&lt;p&gt;In today's workplace, there is a strong trend towards hiring developers with a broad set of skills; this indicates that employers are looking for "full-stack" developers who know a little of everything and are ready to accommodate any type of environment quickly.&lt;/p&gt;

&lt;p&gt;On the other side, many companies prefer to hire developers with solid/compact experience in several programming languages.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Summary
&lt;/h2&gt;

&lt;p&gt;So, the question is, it's Good or Bad to become a Full Stack Developer?&lt;/p&gt;

&lt;p&gt;🟨 Good for companies to launch/test/iterate fast and to spend less money.&lt;/p&gt;

&lt;p&gt;🟨 Good for candidates to adopt it to experiment, find where their skills fit, and then stick to a narrowed skill-set and scale.&lt;/p&gt;

&lt;p&gt;🟥 Bad for Products Quality considering the broad skill-set of the developer. &lt;/p&gt;

&lt;p&gt;🟥 Bad for developers in the long run because serious companies tend to hire narrow-skilled people rather than broad-skilled ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Perspective
&lt;/h2&gt;

&lt;p&gt;You can choose at a certain point to become a Full Stack Developer, to experiment with your skills/wants/talent, then switch rapidly after finding where your skills/personality fit more  and stick to it in the long run.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Fact
&lt;/h2&gt;

&lt;p&gt;🟩 Excellent people in a particular skill perform better and make Excellent products.&lt;/p&gt;

</description>
      <category>career</category>
      <category>discuss</category>
      <category>myth</category>
    </item>
    <item>
      <title>How I'm forcing myself to write CSS following certain rules</title>
      <dc:creator>Arbaoui Mehdi</dc:creator>
      <pubDate>Wed, 21 Apr 2021 09:42:17 +0000</pubDate>
      <link>https://dev.to/arbaoui_mehdi/how-i-m-forcing-myself-to-write-css-following-certain-rules-2pjd</link>
      <guid>https://dev.to/arbaoui_mehdi/how-i-m-forcing-myself-to-write-css-following-certain-rules-2pjd</guid>
      <description>&lt;p&gt;Forcing yourself to write a CSS code that follows a guideline can help the person ensue a list of good practices to write a CSS code reflecting a definite logic. Plus, it can adapt the whole team to a coding guideline to avoid incoherence across the entire code base.&lt;/p&gt;

&lt;p&gt;I wrote the &lt;code&gt;.stylelintrc&lt;/code&gt; list of practices to adapt to how I embrace the CSS language; moreover, it can be tweakable depending on the context, and this is a summary of what can be done following these rules.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Check the Coding &lt;a href="https://github.com/freemh/stylelint-rules/blob/main/.stylelintrc"&gt;Guidelines&lt;/a&gt; that cover a thorough description of all the &lt;code&gt;.stylelintrc&lt;/code&gt; rules&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;Sass Codings Rules Summary&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Don't use IDs for styling.&lt;/li&gt;
&lt;li&gt;Don't Reference or style descendent elements in your class selectors&lt;/li&gt;
&lt;li&gt;Remove all trailing white space for your files&lt;/li&gt;
&lt;li&gt;Don't mix spaces with tabs for indentation&lt;/li&gt;
&lt;li&gt;Separate your code into a logical section using standard comment blocks.&lt;/li&gt;
&lt;li&gt;Leave one clear line under your section comments.&lt;/li&gt;
&lt;li&gt;CSS rules should be comma-separated but live on new lines&lt;/li&gt;
&lt;li&gt;Include a single space before the opening brace of a rule-set&lt;/li&gt;
&lt;li&gt;Include a single space after the colon of a declaration.&lt;/li&gt;
&lt;li&gt;Include a semi-colon at the end of every declaration in a declaration block&lt;/li&gt;
&lt;li&gt;Include a space after each comma in comma-separated property or function values.&lt;/li&gt;
&lt;li&gt;CSS Blocks should be separated by a single clear line&lt;/li&gt;
&lt;li&gt;Always use double quotes, quote attribute values in selectors&lt;/li&gt;
&lt;li&gt;Use lower-case and shorthand hex values&lt;/li&gt;
&lt;li&gt;Where allowed, avoid specifying units of zero values&lt;/li&gt;
&lt;li&gt;Disallow redundant values in shorthand properties.&lt;/li&gt;
&lt;li&gt;Never use &lt;code&gt;!important&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Set properties explicitly&lt;/li&gt;
&lt;li&gt;Enforces &lt;code&gt;sass&lt;/code&gt; variables in any CSS property using hex colors, except for the &lt;code&gt;currentColor&lt;/code&gt; and &lt;code&gt;inherit&lt;/code&gt; values.&lt;/li&gt;
&lt;li&gt;Sorts related property declarations by grouping together following the order (Sass Inheritance, Positioning, Box Model, Typography, Visual, Animation, Misc)&lt;/li&gt;
&lt;li&gt;Declare pseudo-classes with a single colon&lt;/li&gt;
&lt;li&gt;Declare pseudo-elements with a double colon&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;rem&lt;/code&gt; units as primary unit type, This includes:&lt;/li&gt;
&lt;li&gt;Positioning: &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;bottom&lt;/code&gt;, &lt;code&gt;left&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Dimensions: &lt;code&gt;width&lt;/code&gt;, &lt;code&gt;height&lt;/code&gt;, &lt;code&gt;margin&lt;/code&gt;, &lt;code&gt;padding&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Font Size --&amp;gt;
Use &lt;code&gt;px&lt;/code&gt; units as a primary unit type for the following properties&lt;/li&gt;
&lt;li&gt;Border widths: &lt;code&gt;border: 1px solid #bada55;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Line-height should be kept unitless. If you find you are using a line-height with a set unit type, try to think of alternative ways to achieve the same outcome. If it's a unique case that requires a specific &lt;code&gt;px&lt;/code&gt; or &lt;code&gt;rem&lt;/code&gt; unit, outline the reasoning with comments so that others are aware of its purpose.&lt;/li&gt;
&lt;li&gt;Avoid all use of magic numbers. Rethink the problem (&lt;code&gt;margin-top: 37px&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Aim for maximum depth of just 1 nested rule&lt;/li&gt;
&lt;li&gt;Components Syntax should follow &lt;code&gt;&amp;lt;componentName&amp;gt;[--modifierName|-descendantName]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.componentName&lt;/code&gt; must be written in camel case.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.componentName&lt;/code&gt; class names as short as possible but as long as necessary.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--modifierName&lt;/code&gt; must be written in camel case&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--modifierName&lt;/code&gt; must be separated from the component name by two hyphens&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;descendantName&lt;/code&gt; must be written in camel case&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;componentName.is-stateOfComponent&lt;/code&gt; for state-based modifications of components&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;is-stateOfComponent&lt;/code&gt; must be camel case&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;is-stateOfComponent&lt;/code&gt; should be used as an adjoining class&lt;/li&gt;
&lt;li&gt;Variables should be name such &lt;code&gt;[&amp;lt;componentName&amp;gt;[--modifierName][-descendantName]-]&amp;lt;propertyName&amp;gt;-&amp;lt;variableName&amp;gt;[--&amp;lt;modifierName&amp;gt;]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;Coding Guidelines&lt;/h1&gt;

&lt;h2&gt;
  
  
  General Principles
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Use Classes in SCSS for styling elements.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Stylelint Rule
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"selector-max-id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;❌ Don't use IDs for styling.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nn"&gt;#component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;✅ Style the base elements (such as typography elements)&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;❌ Reference or style descendent elements in your class selectors&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.component&lt;/span&gt; &lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Performance
&lt;/h2&gt;

&lt;p&gt;Overly specific selectors can cause performance issues, it requires a lot of DOM walking and for large documents can cause a significant increase in the layout time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;❌ Don't&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nt"&gt;ul&lt;/span&gt;&lt;span class="nc"&gt;.user-list&lt;/span&gt; &lt;span class="nt"&gt;li&lt;/span&gt; &lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;✅ Do&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.user-list-link&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Formating &amp;amp; Indentation
&lt;/h2&gt;

&lt;p&gt;Remove all trailing white space for your files&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"no-eol-whitespace"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't mix spaces with tabs for indentation&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"indentation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Commenting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Separate your code into a logical section using standard comment blocks.&lt;/li&gt;
&lt;li&gt;Leave one clear line under your section comments.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Do&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// =============================================================================&lt;/span&gt;
&lt;span class="c1"&gt;// FILE TITLE / SECTION TITLE&lt;/span&gt;
&lt;span class="c1"&gt;// =============================================================================&lt;/span&gt;


&lt;span class="c1"&gt;// Comment Block / Sub-section&lt;/span&gt;
&lt;span class="c1"&gt;// -----------------------------------------------------------------------------&lt;/span&gt;
&lt;span class="c1"&gt;//&lt;/span&gt;
&lt;span class="c1"&gt;// Purpose: This will describe when this component should be used. This comment&lt;/span&gt;
&lt;span class="c1"&gt;// block is 80 chars long&lt;/span&gt;
&lt;span class="c1"&gt;//&lt;/span&gt;
&lt;span class="c1"&gt;// 1. Mark lines of code with numbers which are explained here.&lt;/span&gt;
&lt;span class="c1"&gt;// This keeps your code clean, while also allowing detailed comments.&lt;/span&gt;
&lt;span class="c1"&gt;//&lt;/span&gt;
&lt;span class="c1"&gt;// -----------------------------------------------------------------------------&lt;/span&gt;

&lt;span class="nc"&gt;.component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;...&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;1&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Spacing
&lt;/h2&gt;

&lt;p&gt;CSS rules should be comma-separated but live on new lines&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"selector-list-comma-newline-after"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"always"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Include a single space before the opening brace of a rule-set&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"block-closing-brace-space-before"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"always"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Include a single space after the colon of a declaration.&lt;/li&gt;
&lt;li&gt;include a semi-colon at the end of every declaration in a declaration block&lt;/li&gt;
&lt;li&gt;include a space after each comma in comma-separated property or function values.&lt;/li&gt;
&lt;li&gt;CSS Blocks should be separated by a single clear line&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quotes
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Always use double quotes, quote attribute values in selectors&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"checkbox"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("/img/you.jpg")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Helvetica Neue Light"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Helvetica Neue"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Helvetica&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Arial&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;❌ Don't&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"checkbox"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url(/img/you.jpg)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Helvetica&lt;/span&gt; &lt;span class="n"&gt;Neue&lt;/span&gt; &lt;span class="n"&gt;Light&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Helvetica&lt;/span&gt; &lt;span class="n"&gt;Neue&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Helvetica&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Arial&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  When Declaring Values
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use lower-case and shorthand hex values&lt;/li&gt;
&lt;li&gt;use unit-less line-height values&lt;/li&gt;
&lt;li&gt;Where allowed, avoid specifying units of zero values&lt;/li&gt;
&lt;li&gt;Never use &lt;code&gt;!important&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set properties explicitly&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;background-color: #333&lt;/code&gt; over &lt;code&gt;background: #333&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;margin-top: 10px&lt;/code&gt; over &lt;code&gt;margin: 10px 0 0&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


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

&lt;blockquote&gt;
&lt;p&gt;✅ Do&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#ccc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#aaa&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="mi"&gt;.25&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;❌ Don't&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#ccc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#aaaaaa&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400px&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//jerk #yolo FUUUUUU&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Declaration order
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;The goal is to understand the essence of the styles by reading few declarations. Most of the time, the essence is how the element is laid out and its size is determined. A proper ordering of rules allows to scan the declaration block for properties quickly, and this is the order that should be followed:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.declarationOrder&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="cm"&gt;/* Declarations */&lt;/span&gt;
  &lt;span class="nv"&gt;$varName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#ccc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="cm"&gt;/* Sass Inheritance */&lt;/span&gt;
  &lt;span class="k"&gt;@extend&lt;/span&gt; &lt;span class="nv"&gt;%a-placeholder&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;@include&lt;/span&gt; &lt;span class="nd"&gt;silly-links&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Content&lt;/span&gt;
  &lt;span class="nl"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Positioning&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Box Model&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;right&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Typography&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$varName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;normal&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt; &lt;span class="s2"&gt;"Helvetica"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="mi"&gt;.3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Visual&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$varName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;opacity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Animation&lt;/span&gt;
  &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="m"&gt;1s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Misc&lt;/span&gt;
  &lt;span class="na"&gt;user-select&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;✅ Do&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Sass Inheritance&lt;/span&gt;
  &lt;span class="k"&gt;@extend&lt;/span&gt; &lt;span class="nv"&gt;%a-placeholder&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;@include&lt;/span&gt; &lt;span class="nd"&gt;silly-links&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Position and Layout&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Box Model&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;150px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Typography&lt;/span&gt;
  &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="mi"&gt;.25&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#aaa&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;❌ Don't&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;@include&lt;/span&gt; &lt;span class="nd"&gt;silly-links&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;@extend&lt;/span&gt; &lt;span class="nv"&gt;%a-placeholder&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="mi"&gt;.25&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;150px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#aaa&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Pseudo Elements and Classes
&lt;/h2&gt;

&lt;p&gt;Pseudo Elements and classes are very different things, as is the syntax used to declare them:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Declare pseudo &lt;strong&gt;classes&lt;/strong&gt; with a single colon&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.component&lt;/span&gt;&lt;span class="nd"&gt;:focus&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.component&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;✅ Declare pseudo &lt;strong&gt;elements&lt;/strong&gt; with a double colon&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;before&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;after&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;❌ Don't&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.component&lt;/span&gt;&lt;span class="nd"&gt;:after&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Units
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Do&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;rem&lt;/code&gt; units as primary unit type, This includes:

&lt;ul&gt;
&lt;li&gt;Positioning: &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;bottom&lt;/code&gt;, &lt;code&gt;left&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Dimensions: &lt;code&gt;width&lt;/code&gt;, &lt;code&gt;height&lt;/code&gt;, &lt;code&gt;margin&lt;/code&gt;, &lt;code&gt;padding&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Font Size&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;px&lt;/code&gt; units as a primary unit type for the following properties

&lt;ul&gt;
&lt;li&gt;Border widths: &lt;code&gt;border: 1px solid #bada55;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Line-height should be kept unit-less. If you find you are using a line height with a set unit type, try to think of alternative ways to achieve the same outcome. If it's a unique case that requires a specific &lt;code&gt;px&lt;/code&gt; or &lt;code&gt;rem&lt;/code&gt; unit, outline the reasoning with comments so that others are aware of its purpose.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;❌ Don't&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Avoid all use of magic numbers. Rethink the problem (&lt;code&gt;margin-top: 37px&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Nesting
&lt;/h2&gt;

&lt;p&gt;Nesting is handy, sometimes, but will conflict with our &lt;strong&gt;Specificity&lt;/strong&gt; and &lt;strong&gt;Performance&lt;/strong&gt; guidelines.&lt;/p&gt;

&lt;p&gt;As we follow conventions and thoughts from widely accepted methodologies such as BEM, the use of the suffix can help immensely though.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Just because you can, doesn't mean you should.&lt;/li&gt;
&lt;li&gt;Watch your output, be mindful of Specificity and Performance described in this document.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Aim for maximum depth of just 1 nested rule&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.panel-body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.panel-sideBar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.panel-sideBar-item&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.panel-sideBar-item-label&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#aeaeae&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nc"&gt;.has-smallFont&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At its worst, this produces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.panel-sideBar-item-label.has-smallFont&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;❌ Don't&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.bc-tab-panel&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.panel-body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nc"&gt;.panel-side-bar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

      &lt;span class="nc"&gt;.panel-side-item&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="nc"&gt;.panel-side-item-label&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#aeaeae&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

          &lt;span class="k"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nc"&gt;.small-font&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
          &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At its worst, this produces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.bc-tab-panel&lt;/span&gt;
  &lt;span class="nc"&gt;.panel-body&lt;/span&gt;
  &lt;span class="nc"&gt;.panel-side-bar&lt;/span&gt;
  &lt;span class="nc"&gt;.panel-side-item&lt;/span&gt;
  &lt;span class="nc"&gt;.panel-side-item-label.small-font&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;13px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  @extends or &lt;a class="mentioned-user" href="https://dev.to/include"&gt;@include&lt;/a&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Excessive use of &lt;code&gt;@include&lt;/code&gt; can cause unnecessary bloat to your stylesheet, but gzip should help with that&lt;/li&gt;
&lt;li&gt;Excessive use of &lt;code&gt;@extend&lt;/code&gt; can create a large selector block (not helpful in web inspector) and hoisting of your selector can cause override and inheritance issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ We advise to &lt;code&gt;@include&lt;/code&gt; over &lt;code&gt;@extend&lt;/code&gt; generally but use common sense. In situations where it's better to &lt;code&gt;@extend&lt;/code&gt; it's safer to do so on a placeholder selector&lt;/p&gt;

&lt;p&gt;✅ Make use of placeholder selectors to separate repeated local styles&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nv"&gt;%placeholderSelector&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#eee&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.component1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;@extend&lt;/span&gt; &lt;span class="nv"&gt;%placeholderSelector&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.component2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;@extend&lt;/span&gt; &lt;span class="nv"&gt;%placeholderSelector&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Components
&lt;/h2&gt;

&lt;p&gt;Syntax: &lt;code&gt;&amp;lt;componentName&amp;gt;[--modifierName|-descendantName]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This component syntax is mainly taken from &lt;a href="http://suitcss.github.io/"&gt;Suit CSS&lt;/a&gt; with minor modifications.&lt;/p&gt;

&lt;p&gt;Component Driven development offers several benefits when reading and writing HTML and CSS:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It helps to distinguish between the classes for the root of the component, descendant elements, and modifications.&lt;/li&gt;
&lt;li&gt;It keeps the specificity of selectors low.&lt;/li&gt;
&lt;li&gt;It helps to decouple presentation semantics from document semantics.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can think of components as custom elements that enclose specific semantics, styling, and behavior.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;❌ Do not choose a class name base on its visual presentation or its content&lt;/p&gt;

&lt;p&gt;✅ The Primary achitectural division is between components and utilities:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;componentName (eg. &lt;code&gt;.dropdown&lt;/code&gt; or &lt;code&gt;.buttonGroup&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;componentName--modifierName (eg. &lt;code&gt;.dropdwon--dropUp&lt;/code&gt; or &lt;code&gt;.button--primary&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;componentName-descendantName (eg. &lt;code&gt;.dropdown-item&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;componentName.is-stateOfComponent (eg. &lt;code&gt;dropdown.is-active&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;u-utilityName (eg. &lt;code&gt;u-textTruncate&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ComponentName
&lt;/h3&gt;

&lt;p&gt;The component's name must be written in the camel case. Use class names as short as possible but as long as necessary.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Example &lt;code&gt;.nav&lt;/code&gt; not &lt;code&gt;.navigation&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Example &lt;code&gt;.button&lt;/code&gt; not &lt;code&gt;.btn&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.myComponent&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="cm"&gt;/*...*/&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"myComponent"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  componentName--modifierName
&lt;/h3&gt;

&lt;p&gt;A component modifier is a class that modifies the presentation of the base component in some form. Modifier names must be written in camel case and be separated from the component name by two hyphens. The class should be included in the HTML in addition to the base component class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.button--primary&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"button button--primary"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  componentName-descendantName
&lt;/h3&gt;

&lt;p&gt;A component descendant is a class this is attached to a descendant node of a component. It's responsible for applying presentation directly to the descendant on behalf of a particular component. Descendant names must be written in the camel case.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"tweet"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;header&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"tweet-header"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"tweet-avatar"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"{$src}"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"{$alt}"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    ...
  &lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"tweet-body"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You might notice that &lt;code&gt;tweet-avatar&lt;/code&gt;, despite being a descendant of &lt;code&gt;tweet-header&lt;/code&gt; does not have the class of &lt;code&gt;tweet-header-avatar&lt;/code&gt;. WHY? because it doesn't necessarily &lt;strong&gt;have&lt;/strong&gt; to live there. It could be adjacent to &lt;code&gt;tweet-header&lt;/code&gt; and function the same way. Therefore, you should only prepend a descendant with its parent if must live there. Strive to keep class names as short as possible, but as long as necessary.&lt;/p&gt;

&lt;p&gt;When building a component, you'll often run into the situation where you have a list, group or simply require a container for some descendants. In this case, it's much better to follow a pattern of pluralizing the container and having each descendant be singular. This keeps the relationship clear between descendant levels.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Do&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;nav&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pagination"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ul&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pagination-list"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pagination-listItem"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;ul&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"breadcrumbs"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"breadcrumb"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"breadcrumb-label"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;❌ Avoid verbose descendant names&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;nav&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pagination"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ul&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pagination-pages"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pagination-pages-page"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;ul&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"breadcrumbs"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;li&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"breadcrumbs-breadcrumb"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"breadcrumbs-breadcrumb-label"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  componentName.is-stateOfComponent
&lt;/h3&gt;

&lt;p&gt;Use &lt;code&gt;is-stateName&lt;/code&gt; for state-based modifications of components. The state name must be Camel case. Never style these classes directly; they should always be used as an adjoining class.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;JS&lt;/code&gt; or any backend language can add/remove these classes. This means that the same state names can be used in multiple contexts, but every component must define its own styles for the state (as they are scoped to the component).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;article&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"tweet is-expanded"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.tweet&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.tweet.is-expanded&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Utilities
&lt;/h2&gt;

&lt;p&gt;Utility classes are low-level structural and positional traits. Utilities can be applied directly to any element; multiple utilities can be used together, and utilities can be used alongside component classes.&lt;/p&gt;

&lt;p&gt;Utility classes should be used sparingly, lean towards component level styling to make for as reusable HTML patterns as possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  u-utilityName
&lt;/h3&gt;

&lt;p&gt;Syntax: &lt;code&gt;u-&amp;lt;utilityName&amp;gt;&lt;/code&gt;&lt;br&gt;
Utilities must use a camel case name, prefixed with a &lt;code&gt;u&lt;/code&gt; namespace.&lt;/p&gt;
&lt;h2&gt;
  
  
  Variables and Mixins
&lt;/h2&gt;

&lt;p&gt;Variables and Mixins should follow similar naming conventions.&lt;/p&gt;
&lt;h3&gt;
  
  
  Variables
&lt;/h3&gt;

&lt;p&gt;Syntax: &lt;code&gt;[&amp;lt;componentName&amp;gt;[--modifierName][-descendantName]-]&amp;lt;propertyName&amp;gt;-&amp;lt;variableName&amp;gt;[--&amp;lt;modifierName&amp;gt;]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Variables should be named as such, things that can change over time.&lt;/p&gt;

&lt;p&gt;Variables should also follow our component naming convention to show context and be in camelCase. If the variable is a global, generic variable, the property name should be prefixed first, followed by the variant and or modifier name for a clearer understanding of use.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Abstract your variable names&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nv"&gt;$color-brandPrimary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#aaa&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$fontSize--large&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$lineHeight-small&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="mi"&gt;.2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;❌ Name your variables after the color value&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nv"&gt;$zirotoheroBlue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#00abc9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$color-blue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#00ffee&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$color-lightBlue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#eeff00&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Component / Micro App level variables
&lt;/h2&gt;

&lt;p&gt;Micro apps must base their local variables on the global variables primarily. You may add your own specific variables as required if no global variable is available.&lt;/p&gt;

&lt;p&gt;For portability, your component should declare its own set of variables inside its own settings partial, inside the settings folder.&lt;/p&gt;

&lt;p&gt;If your variable is scoped to your component, it should be namespaced as such following component naming conventions.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Do&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="nt"&gt;componentName-fontSize&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;                                &lt;span class="nt"&gt;fontSize&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;"small"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="nt"&gt;componentName-decendantName-backgroundColor&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;           &lt;span class="nf"&gt;#ccc&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="nt"&gt;componentName-decendantName-marginBottom&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;              &lt;span class="nt"&gt;fontSize&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;"large"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="nt"&gt;componentName-decendantName--active-backgroundColor&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;   &lt;span class="err"&gt;#000&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.componentName&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;componentName-fontSize&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.componentName-decendantName&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;componentName-decendantName-backgroundColor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;componentName-decendantName-marginBottom&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.componentName-decendantName--active&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;componentName-decendantName--active-backgroundColor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Maps
&lt;/h2&gt;

&lt;p&gt;Variable maps with a simple getter mixin, can help simplify your variable names when calling them, and help better group variables together using their relationship.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Do&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Setting variables and mixin&lt;/span&gt;
&lt;span class="c1"&gt;// -----------------------------------------------------------------------------&lt;/span&gt;

&lt;span class="nv"&gt;$colors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;primary&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#00abc9&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;light&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#daf1f6&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;dark&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#12799a&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;secondary&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#424d55&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;light&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#ccc&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;lightest&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#efefef&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;dark&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#404247&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;success&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#bbd33e&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;light&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#eaf0c6&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;@function&lt;/span&gt; &lt;span class="nf"&gt;color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$tone&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"base"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;@return&lt;/span&gt; &lt;span class="nf"&gt;map-get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;map-get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$colors&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$tone&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Usage&lt;/span&gt;
&lt;span class="c1"&gt;// -----------------------------------------------------------------------------&lt;/span&gt;

&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"secondary"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nt"&gt;h3&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"secondary"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"dark"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.alert&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"primary"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"light"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.alert-close&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"primary"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.alert--success&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"success"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"light"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;.alert-close&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"success"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Every variable used in the core architecture must be based on the global&lt;br&gt;
variables.&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Colors
&lt;/h3&gt;

&lt;p&gt;Use the globally available colors.&lt;br&gt;
A component shouldn't really have a need for a &lt;em&gt;new&lt;/em&gt; color.&lt;br&gt;
This creates consistency and sanity.&lt;/p&gt;

&lt;p&gt;Avoid using the &lt;code&gt;darken(color, %)&lt;/code&gt; and &lt;code&gt;lighten(color, %)&lt;/code&gt; mixins for similar reasons.&lt;/p&gt;

&lt;p&gt;Use the color maps available to you:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;"brand"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;"primary"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  z-index scale
&lt;/h2&gt;

&lt;p&gt;Use the z-index scale under global settings.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;zIndex("lowest")&lt;/code&gt; or &lt;code&gt;zIndex("high")&lt;/code&gt; for example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Font Weight
&lt;/h2&gt;

&lt;p&gt;Never declare a new font-weight,&lt;br&gt;
only use the available font settings. e.g.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;fontWeight&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;"light"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nt"&gt;fontWeight&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;"semibold"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Line Height
&lt;/h3&gt;

&lt;p&gt;We provide a line-height scale. This should be used for blocks of text. e.g.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;lineHeight&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;"smallest"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nt"&gt;lineHeight&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;"large"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, when using line height to vertically center a single line of text, be sure to set the line height to the height of the container - 1.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;remCalc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;50px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;remCalc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;49px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Animations
&lt;/h3&gt;

&lt;p&gt;Animation delays, durations, and easing should be taken from the global framework&lt;/p&gt;

&lt;h2&gt;
  
  
  Mixins
&lt;/h2&gt;

&lt;p&gt;Mixins follow regular camel case naming conventions and do not require namespacing. If you are creating a mixin for a utility, it will need to match the utility name (including &lt;code&gt;u&lt;/code&gt; namespacing).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;@mixin buttonVariant;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@mixin u-textTruncate;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>sass</category>
      <category>lint</category>
    </item>
    <item>
      <title>Using Comments in Sass</title>
      <dc:creator>Arbaoui Mehdi</dc:creator>
      <pubDate>Mon, 07 Oct 2019 19:17:35 +0000</pubDate>
      <link>https://dev.to/arbaoui_mehdi/using-comments-in-sass-1jd0</link>
      <guid>https://dev.to/arbaoui_mehdi/using-comments-in-sass-1jd0</guid>
      <description>&lt;h2&gt;
  
  
  Video
&lt;/h2&gt;

&lt;p&gt;&lt;iframe src="https://player.vimeo.com/video/364861791" width="710" height="399"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Source Code used in the video
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/freemh/dont-repeat-your-css/tree/master/1-sass-fundamentals/4-comments"&gt;https://github.com/freemh/dont-repeat-your-css/tree/master/1-sass-fundamentals/4-comments&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Lesson Script
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Introduction
&lt;/h4&gt;

&lt;p&gt;If we take a look at this code right here, we see that it’s telling nothing, we know from the result on the browser that this is the alert and buttons styles, but we’re not obligated reading the code to deduce where it’s used.&lt;/p&gt;

&lt;p&gt;Maybe the code sound familiar to you, because you’re the one who writes it, but once you’re away from it for a longer period, you’ll forget what this code is doing exactly, and imagine the hustle of having plenty of these stylesheets with no comments.&lt;/p&gt;

&lt;p&gt;Same goes here if you’re in a team, and everyone has to know what this part of the code is doing, or what this stylesheet is about. And to assure transparency for both ourselves and other developers we’ve to use Comments, that will assist in generating a well-formatted CSS and makes stylesheets easy to navigate through.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Alright, How to add comments using Sass?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Sass has two types of comment, multi-line comments, and Single-line comments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multiline Comments
&lt;/h2&gt;

&lt;p&gt;Let’s start with the multi-line comments, each part of this code is for a specific use case. We use these symbols &lt;code&gt;/*&lt;/code&gt; to start a multiline-comment, and the comment will end after closing the &lt;code&gt;*/&lt;/code&gt; symbols, now we can write our comment in multiple lines, this code here is used as a reset style, so we’ll define &lt;code&gt;Reset&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;
&lt;span class="cm"&gt;/* Reset */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we want to use this comment as a multiline-comment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="cm"&gt;/*

Reset

*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And if we take look at the generated CSS, we’ll see that the comment is generated with multiple lines, personally, I prefer using asterisks to give a better look at the comment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="cm"&gt;/*
*
* Buttons
*
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Single-line Comments
&lt;/h3&gt;

&lt;p&gt;We've also single-line comment, and to create a single-line comment we use double slashes &lt;code&gt;//&lt;/code&gt; at the beginning of the comment, as an example at this location of the code &lt;code&gt;border-radius&lt;/code&gt;, we want to tell ourselves and for anyone who open this file in the future &lt;code&gt;don't use percentage&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.item&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// don't use percentage&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These single-line comments will not be presented in the compiled CSS like the multiline-comments, and they span on one line, not multiple lines.&lt;/p&gt;

&lt;p&gt;But you should know, that this generated CSS here is not minified or compressed, because we're not telling the Sass preprocessor to do so by using this command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sass main.scss:main.css &lt;span class="nt"&gt;--watch&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Keep Comments in Generated CSS files
&lt;/h3&gt;

&lt;p&gt;What if we want to use this file in production, which means that we’ve to minify the “main.css” to decrease the file size for better performance.&lt;/p&gt;

&lt;p&gt;So, in this case, we will use the option &lt;code&gt;--style compressed&lt;/code&gt; from the Sass CLI, to compress the generated CSS.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sass main.scss:main.css &lt;span class="nt"&gt;--watch&lt;/span&gt; &lt;span class="nt"&gt;--style&lt;/span&gt; compressed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And if we hit save again from the Sass file, we'll see that the code is compressed, now all the comments don't exist neither Multi-Line or Single-Line comments, Single-Line comments in both cases are not generated on the CSS file, because they are specific to Sass, but, what if we want to have some multi-lines comments appears and not be removed, like this one, that includes the &lt;code&gt;Author&lt;/code&gt; of the code, and the &lt;code&gt;Email&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="cm"&gt;/*
*
* Author: Arbaoui Mehdi
* Email: arbaoui.mehdi@gmail.com
*
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When we hit save again, this comment doesn’t appear in the CSS file, however, we can force Sass to keep multiline comments in the final output by using this &lt;code&gt;!&lt;/code&gt; exclamation mark.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="cm"&gt;/*!
*
* Author: Arbaoui Mehdi
* Email: arbaoui.mehdi@gmail.com
*
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Interpolation in Multiline Comments
&lt;/h3&gt;

&lt;p&gt;From the Sass file, we can even use &lt;strong&gt;interpolation&lt;/strong&gt; within multiline-comments, which means that we can insert variable values inside a multiline-comment, let's create a new variable &lt;code&gt;author-name&lt;/code&gt; that holds a string my name &lt;code&gt;Arbaoui Mehdi&lt;/code&gt; as an example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nv"&gt;$author-name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Arbaoui Mehdi"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get to the value of the variable &lt;code&gt;$author-name&lt;/code&gt; within this comment, we will replace this value &lt;code&gt;Arbaoui Mehdi&lt;/code&gt; from the comment with the variable, to do so we use this syntax &lt;code&gt;#{}&lt;/code&gt;, then inside of the curly braces we put the variable name &lt;code&gt;$author-name&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="cm"&gt;/*!
*
* Author: #{$author-name}
* Email: arbaoui.mehdi@gmail.com
*
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Wants More
&lt;/h3&gt;

&lt;p&gt;To access the full course on How to Stop repeating your CSS by following the Sass DRY principle:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.udemy.com/course/learn-sass-and-dont-repeat-your-css/"&gt;https://www.udemy.com/course/learn-sass-and-dont-repeat-your-css/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>sass</category>
      <category>webdev</category>
      <category>comments</category>
    </item>
    <item>
      <title>Using CSS Custom properties (variables)</title>
      <dc:creator>Arbaoui Mehdi</dc:creator>
      <pubDate>Fri, 04 Oct 2019 08:28:20 +0000</pubDate>
      <link>https://dev.to/arbaoui_mehdi/using-css-custom-properties-variables-1pe</link>
      <guid>https://dev.to/arbaoui_mehdi/using-css-custom-properties-variables-1pe</guid>
      <description>&lt;h1&gt;
  
  
  Video Lesson:
&lt;/h1&gt;

&lt;p&gt;&lt;iframe src="https://player.vimeo.com/video/364245302" width="710" height="399"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Used in this lesson:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/freemh/dont-repeat-your-css/tree/master/1-sass-fundamentals/3-css-variables"&gt;https://github.com/freemh/dont-repeat-your-css/tree/master/1-sass-fundamentals/3-css-variables&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Variables are used to store some specific values, and we can use them whenever you need them, CSS language has already the capability to use variables without the need of a preprocessor like Sass, and these CSS variables or they call them Custom Properties they have some features that Sass Variables doesn’t have, like access to the DOM, because they are considered a part of the DOM, we can even control them using JavaScript. Controlling CSS variables using javascript is not our subject today, we’ll use them from a simple &lt;code&gt;main.css&lt;/code&gt; file.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to create a CSS Variable?
&lt;/h2&gt;

&lt;p&gt;To create a CSS variable is very simple, but first, we need to understand that we’ve two places where we store our variables, the first one is considered as global, and if we create a variable in the global scope or closure it will be accessible within the whole page.&lt;/p&gt;

&lt;p&gt;Let’s create a variable &lt;code&gt;danger-700&lt;/code&gt; that will be accessible within the global scope by using the &lt;code&gt;:root&lt;/code&gt; pseudo-class, then to create a variable we use these two dashes and the name of the variable &lt;code&gt;--danger-700&lt;/code&gt; in this case, then we set a value to it normally, like setting a value to a property, we go for a hex color &lt;code&gt;#721c24&lt;/code&gt;, which it’s already here.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="py"&gt;--danger-700&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#721c24&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This &lt;code&gt;700&lt;/code&gt; here on the variable name means nothing, it’s just a convention that defines that this shade of the color is the darkest one.&lt;/p&gt;

&lt;p&gt;Let’s replace this color &lt;code&gt;#721c24&lt;/code&gt; from this style sheet with the variable &lt;code&gt;--danger-700&lt;/code&gt;, we’ve one here at &lt;code&gt;.alert-danger&lt;/code&gt;, and to set the variable &lt;code&gt;--danger-700&lt;/code&gt; to the &lt;code&gt;color&lt;/code&gt; property we need to use this function &lt;code&gt;var()&lt;/code&gt;, then inside of the function we add the variable &lt;code&gt;--danger-700&lt;/code&gt;, this is the only way on how to set a variable to a property within CSS.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.alert-danger&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--danger-700&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same goes for the &lt;code&gt;.btn-danger&lt;/code&gt; selector&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.btn-danger&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--danger-700&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and the &lt;code&gt;:hover&lt;/code&gt; pseudo-class of the &lt;code&gt;.btn-danger&lt;/code&gt;, we replace this value &lt;code&gt;#721c24&lt;/code&gt; by &lt;code&gt;var(--danger-700)&lt;/code&gt;, COOL.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.btn-danger&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;#f5c6cb&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#f8d7da&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--danger-700&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can do the same thing, for the other colors “#f5c6cb&lt;code&gt;“#f8d7da&lt;/code&gt;, we create two other variables “danger-200&lt;code&gt;and “danger-100&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt; &lt;span class="nt"&gt;--danger-200&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;#f5c6cb&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
 &lt;span class="nt"&gt;--danger-100&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;#f8d7da&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we find these values, and replace them within the file, for both &lt;code&gt;.alert-danger&lt;/code&gt; selectors&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.alert-danger&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--danger-200&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--danger-100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the &lt;code&gt;.btn-danger:hover&lt;/code&gt; pseudo-class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.btn-danger&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--danger-700&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.btn-danger&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--danger-200&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--danger-100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To understand what this &lt;code&gt;:root&lt;/code&gt; it is exactly, so here on the &lt;code&gt;index.html&lt;/code&gt; page we have nested tags, and the parent of all of them is the ‘’ tag, and this is what &lt;code&gt;:root&lt;/code&gt; is about, when we create a variable within the &lt;code&gt;:root&lt;/code&gt;, any nested element will be able to use this variable, it’ll be considered global.&lt;/p&gt;

&lt;p&gt;Now if we’re in the opposite, and we want to create a variable that will be only accessible within a specific block or scope, Okay, we’ll go for this &lt;code&gt;alert&lt;/code&gt; element, the goal is to create a variable that can be used only within this closure, not anywhere else.&lt;br&gt;
To achieve that, we’ve to create the variable within the parent which it’s alert.&lt;br&gt;
Okay, let’s move to our &lt;code&gt;main.css&lt;/code&gt; file, and from &lt;code&gt;.alert&lt;/code&gt; we’ll create a new variable &lt;code&gt;--alert-link&lt;/code&gt; and we’ll get its value from the &lt;code&gt;.alert-danger .alert-link&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.alert&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="py"&gt;--alert-link&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#c73c49&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, we’ll replace the &lt;code&gt;color&lt;/code&gt; value from &lt;code&gt;.alert-danger .alert-link&lt;/code&gt; selector, with the variable &lt;code&gt;--alert-link&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.alert-danger&lt;/span&gt; &lt;span class="nc"&gt;.alert-link&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--alert-link&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, if we copy this variable here &lt;code&gt;var(--alert-link);&lt;/code&gt;, and we try to use it from the &lt;code&gt;color&lt;/code&gt; property of the &lt;code&gt;.btn&lt;/code&gt; selector.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.btn&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--alert-link&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It’ll not work, why because the variable &lt;code&gt;--alert-link&lt;/code&gt; can only be used within its scope, not anywhere else.&lt;br&gt;
Let’s return the button color initial value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.btn&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we want to use the variable &lt;code&gt;--alert-link&lt;/code&gt; within the &lt;code&gt;.btn&lt;/code&gt; selector, we’ve two choices, whether create it on the &lt;code&gt;:root&lt;/code&gt; which will be global or create another variable &lt;code&gt;--alert-link&lt;/code&gt; within the &lt;code&gt;.btn&lt;/code&gt; selector.&lt;/p&gt;

&lt;h1&gt;
  
  
  CSS Variables or Sass Variables
&lt;/h1&gt;

&lt;p&gt;I’m sure that you’re asking yourself, so which one to use, the Sass variables, or CSS variables, the answer is depending on the use case, because CSS variables are not 100% supported by all the browsers, and a simple &lt;a href="https://caniuse.com/css-variables"&gt;https://caniuse.com/css-variables&lt;/a&gt; will show some red colors, which means that it’s not fully supported, so you’ve to know them both, and the project of one of your client will have more power in this situation on which environment he or she wants the website to be used.&lt;/p&gt;

&lt;p&gt;But stick to the Sass variables as the first choice, and if cross browsers validation it’s not something you’ve to deal with, in this case, you can use CSS variables.&lt;/p&gt;

</description>
      <category>css</category>
      <category>cssvariables</category>
      <category>customproperties</category>
    </item>
    <item>
      <title>Take a screenshot of VSCode using Polacode Extension</title>
      <dc:creator>Arbaoui Mehdi</dc:creator>
      <pubDate>Thu, 03 Oct 2019 22:39:55 +0000</pubDate>
      <link>https://dev.to/arbaoui_mehdi/take-a-screenshot-of-vscode-using-polacode-extension-524h</link>
      <guid>https://dev.to/arbaoui_mehdi/take-a-screenshot-of-vscode-using-polacode-extension-524h</guid>
      <description>&lt;p&gt;Sometimes I add some tweets that should include code, so we don't have the option to embed code on twitter, so for that, the only solution is to add an image, in this post I'll show you how to create a screenshot of your code from &lt;a href="https://code.visualstudio.com" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt; by using this extension &lt;a href="https://marketplace.visualstudio.com/items?itemName=pnp.polacode" rel="noopener noreferrer"&gt;Polacode&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, you've to install the extension, click on the &lt;code&gt;Extensions&lt;/code&gt; icon on the left sidebar of your editor to open the extensions Market place, then type &lt;code&gt;Polacode&lt;/code&gt; you'll find multiple ones, choose the one that has more downloads.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fcm0sreyxoo9fiphnylgf.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fcm0sreyxoo9fiphnylgf.gif" alt="Install Polacode for vscode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we've to show the command palette by using the shortcut &lt;code&gt;Cmd+Shift+P&lt;/code&gt; for Mac users, or &lt;code&gt;Ctrl+P&lt;/code&gt; for Windows users, then type &lt;code&gt;&amp;gt; Polacode&lt;/code&gt;&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F2dcnw4g257k2hk45a627.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F2dcnw4g257k2hk45a627.gif" alt="Access Polacode Extension"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open any file including code, in my case, I'm using a JavaScript as an example, select the code and it will be shown in the right of the editor.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fybj3eo7usco5u4q79vid.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fybj3eo7usco5u4q79vid.gif" alt="take a screenshot using vscode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I save the file &lt;code&gt;code.png&lt;/code&gt; on the Desktop folder, so open the file to see the result.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fegpaocp4j31toycz2gz2.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fegpaocp4j31toycz2gz2.gif" alt="Open Polacode Result"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>vscode</category>
      <category>plugins</category>
      <category>tools</category>
    </item>
    <item>
      <title>Old School Loops in JavaScript - for loop and forEach</title>
      <dc:creator>Arbaoui Mehdi</dc:creator>
      <pubDate>Wed, 02 Oct 2019 11:03:18 +0000</pubDate>
      <link>https://dev.to/arbaoui_mehdi/old-school-loops-in-javascript-for-loop-and-foreach-3e46</link>
      <guid>https://dev.to/arbaoui_mehdi/old-school-loops-in-javascript-for-loop-and-foreach-3e46</guid>
      <description>&lt;p&gt;In general, if we've got a list of elements, and we want to get each element from this list, or in other words if we want to iterate over the elements of an array we use the old-style &lt;code&gt;for&lt;/code&gt; loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  for Loop
&lt;/h2&gt;

&lt;p&gt;As an example, we've got here an array &lt;code&gt;numbers&lt;/code&gt; that contain a list of numbers.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;78&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;95&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;36&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;47&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;To get each number from this array by using the &lt;code&gt;for&lt;/code&gt; loop, first we've initialize the counter to &lt;code&gt;0&lt;/code&gt;, the condition to be evaluated before each iteration, and the expression to be evaluated after each iteration, in this case incrementing the counter by one, and as long as the condition is true &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;The result of &lt;code&gt;console.log&lt;/code&gt; shows an element from the list &lt;code&gt;numbers&lt;/code&gt; at a specific &lt;code&gt;index&lt;/code&gt; using the counter.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fciwuuuxvt9ew1sxd45hl.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fciwuuuxvt9ew1sxd45hl.gif" alt="for loop JavaScript"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  forEach
&lt;/h1&gt;

&lt;p&gt;Now, and for the same example, we can use the JavaScript ES5 &lt;code&gt;forEach&lt;/code&gt; loop, which executes a function on each element in the array.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;


&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fl84hqr5gm70nnpywsk0y.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fl84hqr5gm70nnpywsk0y.gif" alt="forEach loop"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just to notice that the &lt;code&gt;forEach&lt;/code&gt; is used only for arrays, maps, and sets, the syntax of the &lt;code&gt;forEach&lt;/code&gt; is shorter than the &lt;code&gt;for&lt;/code&gt; loop, however, there are some flaws of using it.&lt;/p&gt;

&lt;p&gt;The first problem is there is no way to &lt;code&gt;break&lt;/code&gt; or stop a current loop, this current presentation is not correct.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;terminate the current loop&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
 &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;


&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fefc6zh0c6127fpcvppvg.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fefc6zh0c6127fpcvppvg.gif" alt="JavaScript forEach Loop can't Break"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The second problem is: you can't use the &lt;code&gt;return&lt;/code&gt; statement from an enclosing function within the loop, and this is an example where the loop should stop and &lt;code&gt;return false&lt;/code&gt; if the condition is &lt;code&gt;true&lt;/code&gt;, but instead it'll show the result of the &lt;code&gt;console.log(number)&lt;/code&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;terminate the current loop&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
 &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;


&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fazj3fdexpf543qpmg2xj.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fazj3fdexpf543qpmg2xj.gif" alt="JavaScript forEach Loop return statement"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What does CSS property auto do in margin and how it calculate free space</title>
      <dc:creator>Arbaoui Mehdi</dc:creator>
      <pubDate>Sun, 29 Sep 2019 15:41:51 +0000</pubDate>
      <link>https://dev.to/arbaoui_mehdi/what-does-css-property-auto-do-in-margin-and-how-it-calculate-free-1k2p</link>
      <guid>https://dev.to/arbaoui_mehdi/what-does-css-property-auto-do-in-margin-and-how-it-calculate-free-1k2p</guid>
      <description>&lt;p&gt;This what we’ll learn in this short video tutorial:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How the CSS Property &lt;code&gt;margin&lt;/code&gt; manage the free space for positioning an element&lt;/li&gt;
&lt;li&gt;How &lt;code&gt;margin&lt;/code&gt; can be used to center an element&lt;/li&gt;
&lt;li&gt;The difference between using a &lt;strong&gt;fixed&lt;/strong&gt; value for the &lt;code&gt;margin&lt;/code&gt; property versus &lt;strong&gt;auto&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Edit Your Website Live In Google Chrome by using document.designMode</title>
      <dc:creator>Arbaoui Mehdi</dc:creator>
      <pubDate>Sat, 28 Sep 2019 21:26:35 +0000</pubDate>
      <link>https://dev.to/arbaoui_mehdi/edit-your-website-live-in-google-chrome-by-using-document-designmode-5d9h</link>
      <guid>https://dev.to/arbaoui_mehdi/edit-your-website-live-in-google-chrome-by-using-document-designmode-5d9h</guid>
      <description>&lt;p&gt;I was on my &lt;a href="https://twitter.com/arbaoui_mehdi" rel="noopener noreferrer"&gt;twitter&lt;/a&gt;, reading stuff, then suddenly I see a tweet which shows a cool feature that I never thought exist, this feature is &lt;code&gt;document.designMode&lt;/code&gt; which allows you editing the entire document directly, this property is set by default to &lt;code&gt;off&lt;/code&gt;, let's change it to &lt;code&gt;on&lt;/code&gt; and see the MAGIC HAPPENS.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F2khp927h1i1w7ew9dimz.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F2khp927h1i1w7ew9dimz.gif" alt="Google Chrome document.designMode"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;designMode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;on&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Credit:&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1177559150563344384-172" src="https://platform.twitter.com/embed/Tweet.html?id=1177559150563344384"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1177559150563344384-172');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1177559150563344384&amp;amp;theme=dark"
  }



&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>chrome</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
