<?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: Bernard Faria</title>
    <description>The latest articles on DEV Community by Bernard Faria (@bernardxf).</description>
    <link>https://dev.to/bernardxf</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%2F73529%2F93ca3c8d-229b-45c0-a197-b324c2328ff7.jpeg</url>
      <title>DEV Community: Bernard Faria</title>
      <link>https://dev.to/bernardxf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bernardxf"/>
    <language>en</language>
    <item>
      <title>My new personal site</title>
      <dc:creator>Bernard Faria</dc:creator>
      <pubDate>Thu, 15 Apr 2021 11:36:14 +0000</pubDate>
      <link>https://dev.to/bernardxf/my-new-personal-site-4li2</link>
      <guid>https://dev.to/bernardxf/my-new-personal-site-4li2</guid>
      <description>&lt;p&gt;Hi guys!&lt;br&gt;
I updated my website! Comment there if you liked it! = D&lt;br&gt;
Doubts, criticisms and / or suggestions are welcome! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.bernardfaria.com.br/"&gt;https://www.bernardfaria.com.br/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dev</category>
      <category>css</category>
      <category>javascript</category>
      <category>website</category>
    </item>
    <item>
      <title>Do you know the scroll-snap-type CSS property ??</title>
      <dc:creator>Bernard Faria</dc:creator>
      <pubDate>Mon, 22 Mar 2021 13:37:53 +0000</pubDate>
      <link>https://dev.to/bernardxf/do-you-know-the-scroll-snap-type-css-property-3d6g</link>
      <guid>https://dev.to/bernardxf/do-you-know-the-scroll-snap-type-css-property-3d6g</guid>
      <description>&lt;p&gt;The CSS scroll-snap-type property allows you to lock the viewport on certain elements or locations after the user has finished scrolling. I venture to say that this will be the future (or already is the present) of the slides.&lt;/p&gt;

&lt;p&gt;For example: A user browsing a photo gallery probably doesn't want to scroll halfway through an image - they probably prefer the image to "snap" to the right position while scrolling.&lt;/p&gt;

&lt;p&gt;I will leave a &lt;a href="https://codepen.io/bernardxf/pen/BapBJGw"&gt;Codepen Link&lt;/a&gt; for better viewing.&lt;/p&gt;

&lt;h2&gt;
  
  
  References:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://css-tricks.com/almanac/properties/s/scroll-snap-type/"&gt;CSS-TRICKS&lt;/a&gt;&lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-type"&gt;Mozilla&lt;/a&gt;&lt;br&gt;
&lt;a href="https://caniuse.com/?search=scroll-snap-type"&gt;Caniuse&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>tutorial</category>
      <category>dev</category>
    </item>
    <item>
      <title>The CSS: is () pseudo-class</title>
      <dc:creator>Bernard Faria</dc:creator>
      <pubDate>Mon, 22 Mar 2021 00:45:14 +0000</pubDate>
      <link>https://dev.to/bernardxf/the-css-is-pseudo-class-mpd</link>
      <guid>https://dev.to/bernardxf/the-css-is-pseudo-class-mpd</guid>
      <description>&lt;p&gt;The CSS: is () pseudo-class function takes a list of selectors as its argument and selects any element that can be selected by one of the selectors in that list. This is useful for writing large selectors in a more compact way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't do this
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.content&lt;/span&gt; &lt;span class="nt"&gt;h1&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;.content&lt;/span&gt; &lt;span class="nt"&gt;h2&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;.content&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="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="nt"&gt;header&lt;/span&gt; &lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nt"&gt;main&lt;/span&gt; &lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nt"&gt;footer&lt;/span&gt; &lt;span class="nt"&gt;p&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;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="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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Do this
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.content&lt;/span&gt; &lt;span class="nd"&gt;:is&lt;/span&gt;&lt;span class="o"&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="o"&gt;)&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="nd"&gt;:is&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;header&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;main&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;footer&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;p&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;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="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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>tutorial</category>
      <category>css</category>
      <category>development</category>
    </item>
    <item>
      <title>How to Use Variable Fonts on the Web</title>
      <dc:creator>Bernard Faria</dc:creator>
      <pubDate>Fri, 11 Sep 2020 14:18:36 +0000</pubDate>
      <link>https://dev.to/bernardxf/how-to-use-variable-fonts-on-the-web-4ehg</link>
      <guid>https://dev.to/bernardxf/how-to-use-variable-fonts-on-the-web-4ehg</guid>
      <description>&lt;p&gt;Variable fonts were developed as the joint effort of the four biggest tech companies involved in type design—Apple, Google, Microsoft, and Adobe. As the name suggests, variable fonts allow designers to derive an unlimited number of font variants from the same font file. This way it becomes possible to adjust the typeface to different devices, viewports, orientations, and other design constraints.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use Variable Fonts?
&lt;/h2&gt;

&lt;p&gt;Variable fonts significantly reduce the limitations of current font formats. Today’s web fonts are inflexible and don’t scale very well; they only provide us with some fixed styles with names like “Light”, “Bold”, or “Extra Bold”. There are even typefaces that only have one weight or slant variant. With a variable approach however, we have access to an infinite flexibility of weight, slant, x-height, slabs, rounding, and other typographical attributes.&lt;/p&gt;

&lt;p&gt;Variable fonts use a single font file that the browser only has to load once. Upon being loaded it can serve all the variants from just that one binary. &lt;/p&gt;

&lt;p&gt;So, here is a brief comparison:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://fonts.google.com/specimen/Roboto?selection.family=Roboto&amp;amp;sidebar.open=true"&gt;Roboto&lt;/a&gt;: twelve font files, twelve variants.&lt;br&gt;
Variable fonts: one font file, unlimited variants.&lt;/p&gt;

&lt;p&gt;As you can already imagine, our typographical options grow incredibly with this newer approach. From practical options, through subtle, all the way to the more.. experimental!&lt;/p&gt;
&lt;h2&gt;
  
  
  Setting Font Variations With CSS
&lt;/h2&gt;

&lt;p&gt;To define font variations, we can use the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-variation-settings"&gt;font-variation-settings&lt;/a&gt; CSS property introduced with the &lt;a href="https://www.w3.org/TR/css-fonts-4/#font-variation-settings-def"&gt;CSS Font Module Level 4&lt;/a&gt;. This is a low-level property that allows us to control the output by specifying a value for each axis.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example: Decovar
&lt;/h3&gt;

&lt;p&gt;Decovar is one of the most versatile examples that currently exists. You can find it on &lt;a href="https://www.axis-praxis.org/specimens/decovar"&gt;Axis Praxis&lt;/a&gt;, on &lt;a href="https://github.com/TypeNetwork/Decovar"&gt;GitHub&lt;/a&gt;, and it also has a &lt;a href="https://www.typenetwork.com/brochure/decovar-a-decorative-variable-font-by-david-berlow#?skelID=SA&amp;amp;skel=1&amp;amp;termID=TA&amp;amp;term=1"&gt;demo page&lt;/a&gt; on TypeNetwork’s website. Decovar contains one registered (weight) and fourteen custom axes, and also has seventeen named instances.&lt;/p&gt;

&lt;p&gt;In the CSS we have to define all the fifteen axes (inline, sheared, rounded slab, stripes, worm terminal, inline skeleton, open inline terminal, inline terminal, worm, weight, flared, rounded, worm skeleton, slab, bifurcated).&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;div&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;Decovar&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;white&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="nb"&gt;rgb&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="m"&gt;162&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;215&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;157.12px&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;left&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;font-variation-settings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;'INLN'&lt;/span&gt; &lt;span class="m"&gt;285.094&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'TSHR'&lt;/span&gt; &lt;span class="m"&gt;346.594&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
        &lt;span class="s2"&gt;'TRSB'&lt;/span&gt; &lt;span class="m"&gt;786.377&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'SSTR'&lt;/span&gt; &lt;span class="m"&gt;84.268&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'TWRM'&lt;/span&gt; &lt;span class="m"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'SINL'&lt;/span&gt; &lt;span class="m"&gt;84.268&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
        &lt;span class="s2"&gt;'TOIL'&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'TINL'&lt;/span&gt; &lt;span class="m"&gt;91.983&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'WORM'&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'wght'&lt;/span&gt; &lt;span class="m"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'TFLR'&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
        &lt;span class="s2"&gt;'TRND'&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'SWRM'&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'TSLB'&lt;/span&gt; &lt;span class="m"&gt;277.155&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'TBIF'&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;p&gt;&lt;b&gt;Note&lt;/b&gt;: we have to specify a value for all the axes in the &lt;i&gt;font-variation-settings&lt;/i&gt; property—even those we don’t want to use. &lt;/p&gt;

&lt;p&gt;We can use any value (even float numbers) for the axes between the min and max values.&lt;/p&gt;

&lt;p&gt;In case of Decovar, we can use 0 as value for the axes we are not interested in; these will be rendered with the default value. This isn’t always the case though, as it depends on the ranges the font uses for the different axes. Decovar is easy, as it uses a 0-1000 range for all axes, and 0 is the default value for all.&lt;/p&gt;

</description>
      <category>css</category>
      <category>design</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What is semantic HTML5?</title>
      <dc:creator>Bernard Faria</dc:creator>
      <pubDate>Tue, 04 Aug 2020 19:34:25 +0000</pubDate>
      <link>https://dev.to/bernardxf/what-is-semantic-html5-3ep7</link>
      <guid>https://dev.to/bernardxf/what-is-semantic-html5-3ep7</guid>
      <description>&lt;p&gt;If you know a little bit of HTML, you'll know that HTML tags are (mostly) used to format the content - these tags tell the browser how to display the content on the page. They do not give an indication of the type of content they contain or what role the content plays on the page.&lt;/p&gt;

&lt;p&gt;Semantic HTML5 addresses this shortcoming by defining specific tags to clearly indicate what role the content these tags play. This explicit information helps robots / crawlers like Google to better understand which content is important, which is a subsidiary, which is navigation and so on.&lt;/p&gt;

&lt;p&gt;For blind or visually impaired users who rely on screen readers to verbally describe what is on a page, proper use of HTML5 semantic elements will allow screen readers to communicate their content more accurately, making the visual audible. It is essential to adopt this latest version of HTML so that you can make your content accessible to all possible site visitors.&lt;/p&gt;

&lt;p&gt;Example of non-semantic tags:&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;div&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example of semantic tags:&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;header&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;nav&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;article&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;main&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>html</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Bootstrap 5 is here! But what has changed?</title>
      <dc:creator>Bernard Faria</dc:creator>
      <pubDate>Fri, 17 Jul 2020 13:14:29 +0000</pubDate>
      <link>https://dev.to/bernardxf/bootstrap-5-is-here-but-what-has-changed-24io</link>
      <guid>https://dev.to/bernardxf/bootstrap-5-is-here-but-what-has-changed-24io</guid>
      <description>&lt;ul&gt;
&lt;li&gt;jQuery was removed&lt;/li&gt;
&lt;li&gt;Switch to Vanilla JavaScript&lt;/li&gt;
&lt;li&gt;Drop Internet Explorer 10 and 11 support&lt;/li&gt;
&lt;li&gt;Improved grid system&lt;/li&gt;
&lt;li&gt;Improved documentation&lt;/li&gt;
&lt;li&gt;Improved modularity&lt;/li&gt;
&lt;li&gt;Improved forms&lt;/li&gt;
&lt;li&gt;New responsive font&lt;/li&gt;
&lt;li&gt;New utilities &amp;amp; helpers&lt;/li&gt;
&lt;li&gt;Easier customization &amp;amp; theming&lt;/li&gt;
&lt;li&gt;Lighter package&lt;/li&gt;
&lt;li&gt;New API available&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the frustrating experiences of being a developer is reinventing the base HTML, CSS, and JavaScript for each project. While some prefer to write their own code, it still makes sense to just use an existing framework like Bootstrap.&lt;/p&gt;

&lt;p&gt;With all the new updates coming in Bootstrap 5, it’s safe to say that the Bootstrap team is making huge steps to make the framework lightweight, simple, useful and faster for the developer’s benefit.&lt;/p&gt;

&lt;p&gt;If you use Bootstrap in your projects, then you will probably love Startup app – Bootstrap Builder. It is a great development tool with lots of ready-made designed and coded templates and themes for faster deployment of your projects.&lt;/p&gt;

&lt;p&gt;Access: &lt;a href="https://v5.getbootstrap.com/"&gt;Bootstrap 5&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Do you know how to do automatic numbering with a CSS counter?</title>
      <dc:creator>Bernard Faria</dc:creator>
      <pubDate>Thu, 16 Jul 2020 14:08:51 +0000</pubDate>
      <link>https://dev.to/bernardxf/do-you-know-how-to-do-automatic-numbering-with-a-css-counter-2a19</link>
      <guid>https://dev.to/bernardxf/do-you-know-how-to-do-automatic-numbering-with-a-css-counter-2a19</guid>
      <description>&lt;p&gt;As you may already know, when we add lists with the &lt;code&gt;&amp;lt;ol&amp;gt;&lt;/code&gt; element, the list is automatically numbered. Using CSS Counter, we can number any element. So, let's see how this is done.&lt;/p&gt;

&lt;p&gt;The CSS counter consists of two main properties: &lt;code&gt;counter-reset&lt;/code&gt; and&lt;code&gt;counter-increment&lt;/code&gt;. The &lt;code&gt;counter-reset&lt;/code&gt; is used to reset the count, while the &lt;code&gt;counter-increment&lt;/code&gt; - together with the pseudo-element - is used to add the numbers.&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;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;counter-reset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;number&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="nd"&gt;:before&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;counter-increment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;"counter(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;In addition, you can also change the type of the number specified in the content property. For example Roman numbers.&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;h2&lt;/span&gt;&lt;span class="nd"&gt;:before&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;counter-increment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;counter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;upper-roman&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="s1"&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;This property can only be useful for a specific type of website and you are unlikely to use it every day.&lt;/p&gt;

</description>
      <category>css</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Do you know the BEM Methodology in CSS?</title>
      <dc:creator>Bernard Faria</dc:creator>
      <pubDate>Thu, 16 Jul 2020 14:03:05 +0000</pubDate>
      <link>https://dev.to/bernardxf/do-you-know-the-bem-methodology-in-css-27no</link>
      <guid>https://dev.to/bernardxf/do-you-know-the-bem-methodology-in-css-27no</guid>
      <description>&lt;p&gt;BEM stands for Block Element Modifier, which consists of a class naming pattern for HTML markup elements based on the element's structural function rather than its presentation function.&lt;/p&gt;

&lt;p&gt;The BEM methodology prioritizes the adoption of 'classes' instead of IDs, as they are reusable. This methodology is used following techniques that facilitate the construction of the code, improving development and agility, reducing maintenance time and helping to preserve the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Block
&lt;/h2&gt;

&lt;p&gt;Block is a logically independent component that encapsulates implementation styles, behavior or technologies. The fact that the blocks are independent allows us to easily reuse them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Element
&lt;/h2&gt;

&lt;p&gt;The element is a part of a block that cannot be used outside of it (for example, items within the menu block).&lt;/p&gt;

&lt;h2&gt;
  
  
  Modifier
&lt;/h2&gt;

&lt;p&gt;The modifier is a BEM entity that defines the state, appearance and behavior of blocks or elements - identical blocks can look different because of a modifier. The use of this entity is optional.&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;.main-block&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;15px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.main-block__article&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;600px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.main-block__article--gray-background&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="no"&gt;gray&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;



</description>
      <category>css</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>You know position sticky?</title>
      <dc:creator>Bernard Faria</dc:creator>
      <pubDate>Thu, 16 Jul 2020 13:57:22 +0000</pubDate>
      <link>https://dev.to/bernardxf/you-know-position-sticky-3ma2</link>
      <guid>https://dev.to/bernardxf/you-know-position-sticky-3ma2</guid>
      <description>&lt;p&gt;&lt;code&gt;position: sticky&lt;/code&gt; is a hybrid of &lt;code&gt;position: relative&lt;/code&gt; and &lt;code&gt;position: fixed&lt;/code&gt;. The element is treated as a relative position until it crosses a specified limit, when it is treated as a fixed position.&lt;/p&gt;

&lt;p&gt;That is, if you want to make, for example, a header that is floating when you start scrolling, just use:&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;header&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="n"&gt;sticky&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://lnkd.in/eKq8TDa"&gt;See the example&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>tutorial</category>
      <category>frontend</category>
      <category>development</category>
    </item>
    <item>
      <title>Calc() function on CSS </title>
      <dc:creator>Bernard Faria</dc:creator>
      <pubDate>Thu, 16 Jul 2020 13:52:28 +0000</pubDate>
      <link>https://dev.to/bernardxf/calc-function-on-css-end</link>
      <guid>https://dev.to/bernardxf/calc-function-on-css-end</guid>
      <description>&lt;p&gt;The calc () function takes a simple expression as a parameter and the result of this expression is usually used as a value for &lt;strong&gt;height&lt;/strong&gt; and &lt;strong&gt;width&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The operators used are:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Addition:
width: calc (100% + 80px);&lt;/li&gt;
&lt;li&gt;Subtraction:
height: calc (100% - 1rem);&lt;/li&gt;
&lt;li&gt;Multiplication:
height: calc (50% * 3);&lt;/li&gt;
&lt;li&gt;Division:
width: calc (100% / 6);&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Observations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Division by 0 (zero) results in an error generated by the HTML parser.&lt;/li&gt;
&lt;li&gt;The + and - operators must be surrounded by white space.&lt;/li&gt;
&lt;li&gt;The * and / operators do not require white space, but adding it for consistency is allowed and recommended.&lt;/li&gt;
&lt;li&gt;It is allowed to nest calc () functions, in which case the internal ones are treated as simple parentheses.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>frontend</category>
      <category>tutorial</category>
      <category>dev</category>
    </item>
  </channel>
</rss>
