HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-03-09
1 <p>The general design for the list of all Muffin’s skills is ready. Well done! Now we need to style individual list items, according to service package.</p>
1 <p>The general design for the list of all Muffin’s skills is ready. Well done! Now we need to style individual list items, according to service package.</p>
2 <p>Recall how we separated the skill items from the ordinary items. We added a class to them that says that what we are dealing with is a skill (skills-item). Could we add one more class to certain skills that will associate them with a certain service package and distinguish them from other skills? We can, in fact, so one element can have two classes at the same time.</p>
2 <p>Recall how we separated the skill items from the ordinary items. We added a class to them that says that what we are dealing with is a skill (skills-item). Could we add one more class to certain skills that will associate them with a certain service package and distinguish them from other skills? We can, in fact, so one element can have two classes at the same time.</p>
3 <p>In fact, an HTML element can have any number of classes. They are listed in the class attribute and separated by spaces. Take, for example:</p>
3 <p>In fact, an HTML element can have any number of classes. They are listed in the class attribute and separated by spaces. Take, for example:</p>
4 &lt;li class="product"&gt;Product&lt;/li&gt; &lt;li class="product hit"&gt;Product, which is one of our bestsellers, too&lt;/li&gt; &lt;li class="product hit sale"&gt;Product, one of our bestsellers and on sale, too!&lt;/li&gt;<p>Using several classes is called<b>mixing classes</b>and is a common technique. Usually mixing is implemented as follows: an overall design is applied to one class, and its variants are applied by additional classes. In the example above, the sizes of product listings can be described in the CSS rule .product and a special background for a bestseller can be described using the rule .hit. Generally speaking, this is a convenient technique that reduces the amount of duplicated code.</p>
4 &lt;li class="product"&gt;Product&lt;/li&gt; &lt;li class="product hit"&gt;Product, which is one of our bestsellers, too&lt;/li&gt; &lt;li class="product hit sale"&gt;Product, one of our bestsellers and on sale, too!&lt;/li&gt;<p>Using several classes is called<b>mixing classes</b>and is a common technique. Usually mixing is implemented as follows: an overall design is applied to one class, and its variants are applied by additional classes. In the example above, the sizes of product listings can be described in the CSS rule .product and a special background for a bestseller can be described using the rule .hit. Generally speaking, this is a convenient technique that reduces the amount of duplicated code.</p>
5 <p>All that remains for us to do is come up with classes for our service packages. We will not introduce an additional class for our Economy service package. For our Standard service package we will use the standard class, and for our VIP service package we will use the vip class. That’s everything. Now you are ready to modify your markup.</p>
5 <p>All that remains for us to do is come up with classes for our service packages. We will not introduce an additional class for our Economy service package. For our Standard service package we will use the standard class, and for our VIP service package we will use the vip class. That’s everything. Now you are ready to modify your markup.</p>