git checkout -- .
mkdir NAME-OF-YOUR-NEW-DIRECTORY
touch "index.html"
git checkout <commit-hash>
To go back to the latest commit (the newest version of our project code), you can type this command:
git checkout master
$sizes: 40px, 50px, 80px;
@each $size in $sizes {
.icon-#{$size} {
font-size: $size;
height: $size;
width: $size;
}
}
$spaceamounts: (1, 2, 3, 4, 5);
@each $space in $spaceamounts {
.m-#{$space} {
margin: #{$space}rem;
}
}
.alert {
// The parent selector can be used to add pseudo-classes to the outer
// selector.
&:hover {
font-weight: bold;
}
// It can also be used to style the outer selector in a certain context, such
// as a body set to use a right-to-left language.
[dir=rtl] & {
margin-left: 0;
margin-right: 10px;
}
// You can even use it as an argument to pseudo-class selectors.
:not(&) {
opacity: 0.8;
}
}
This will generate the following regular CSS:.alert:hover {
font-weight: bold;
}
[dir=rtl] .alert {
margin-left: 0;
margin-right: 10px;
}
:not(.alert) {
opacity: 0.8;
}
.accordion {
max-width: 600px;
&__copy {
display: none;
padding: 1rem 1.5rem 2rem 1.5rem;
&--open {
display: block;
}
}
}
This will generate the following regular CSS:.accordion {
max-width: 600px;
}
.accordion__copy {
display: none;
padding: 1rem 1.5rem 2rem 1.5rem;
}
.accordion__copy--open {
display: block;
}