Snippets are pre-recorded lines of text that allow quick and easy access to the code without having to retype all of the code. They make the coding more efficent as you don't have to retype long lines of text for code that is commonly used. To create a new one you want to copy a selection of text and go to the Snippets tab in VS Code. Once there select new snippet from clipboard. This takes whatever you have copied on the clipboard and creates a snippet for it. Give it a respectable name for the code and then you can use it whenever needed.
Another shortcut is using the $ when repeatidly using the same color in a css document. To use this take the #color that is repeatidly used and rename it to $name then create a command for the document claiming the $name is related to the #color.
<section>
<h1>Lab #</h1>
</section>
<article>
<h1>Heading</h1>
</article>
I think SCSS has benefits for allowing you to watch what you change. It also allows for more flexability and compatibility and you can make dynamic and adaptable styles.
Modified code
#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;
}
}
#OrderDetailsTable {
.subtotals td, .shipping td, .total td {
border-left: none;
}
td, th {
border-left: 1px solid black;
}
tr *:not([class='numeric']) {
padding-left: 10px;
}
th {
font-weight: bold;
color: #FFF;
background-color: $hopeBlue
;
text-align: left;
font-size: 16px;
}
}
To create a navigational menu you first want to use a nav element. You then want to add contents navbar, navbar-expand-md, navbar-light, and bg-light. Then you add containers to the navigational menu. There is also the hamburger menu, which is a button created in the navigational menu to show all the nav bar if the screen size changes.
I used SCSS to add different fonts and colors to certain elements to the website making it have a nice design with a Hope College Theme
#navbar { background-color: $orange !important; border-radius: 6px; .nav-link { color: white; &:hover { background-color: $blue; } } .show { color: white; background-color: $blue; .dropdown-item { color: white; &:hover { background-color: $orange; } } } }
The steps to use google fonts