<?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: GraphiTivity</title>
    <description>The latest articles on DEV Community by GraphiTivity (@graphitivity).</description>
    <link>https://dev.to/graphitivity</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%2F432944%2F27155691-77a7-44ba-ac66-1ceeb8debb4c.jpg</url>
      <title>DEV Community: GraphiTivity</title>
      <link>https://dev.to/graphitivity</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/graphitivity"/>
    <language>en</language>
    <item>
      <title>Question:  Create a new class from existing classes.</title>
      <dc:creator>GraphiTivity</dc:creator>
      <pubDate>Wed, 15 Jul 2020 20:27:39 +0000</pubDate>
      <link>https://dev.to/graphitivity/question-creating-new-css-class-using-existing-class-ghd</link>
      <guid>https://dev.to/graphitivity/question-creating-new-css-class-using-existing-class-ghd</guid>
      <description>&lt;p&gt;This sounds very simple but I have no clue in which direction to go... please advice.&lt;/p&gt;

&lt;p&gt;here is an example:&lt;/p&gt;

&lt;p&gt;Several classes will make my HTML element for example a button will look like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;a class="color-red font-2x bg-black"&amp;gt; Button &amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I want to take the CSS class names and write it in my CSS as below so I can add just one class name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.myButton = { 
              .color-red
              .font-2x
              .bg-black 
             }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now my HTML will look like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;a class="myButton"&amp;gt; Button &amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I'm creating new CSS Class using existing Class. How to do this?&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
