Creating and using snippets
Snippets are attributes given to a clipboard to be used a re-usable code and cause shortcuts in the
coding. This makes sure that when you are typing in your code it will be more efficient. Snippets save
your time when coding and make it easier to code. The $ and # placeholder are the values of a certain
portion of a selected attribute, and they are displayed when using an emmit abreviation.
<section>
<h1></h1>
</section>
<article>
<h1></h1>
</article>
SCSS
In SCSS you can define a variable and apply the value to several properties, and change the value of the
properties by changing the value of the definition. Resulting in the saving of time and effort when
creating css.
#OrderInfo td:nth-child(odd), #Addresses td:nth-child(odd) {
text-align: right;
padding-right: 10px;
}
#OrderInfo td:nth-child(odd)::after, #Addresses td:nth-child(odd)::after {
content: ":";
}
#OrderInfo td:nth-child(even), #Addresses td:nth-child(even) {
border: 1px solid #000;
padding-left: 10px;
text-align: left;
}
#OrderInfo, #Addresses {
td:nth-child(odd) {
text-align: right;
padding-right: 10px;
&::after {
content: ":";
}
}
td:nth-child(even) {
border: 1px solid #000;
padding-left: 10px;
text-align: left;
}
}