This content is posted on the site I run for easier viewing, so please use that as well. [Sass] SCSS Notation Cheat Sheet
SCSS notation is one of the writing styles of Sass. Sass has SCSS notation and SASS notation, and SCSS notation is often used because it is compatible with CSS. The extension should be ".scss".
Abbreviation for "Syntactically Awesome Style Sheet", a CSS metalanguage made by Ruby designed and developed so that CSS can be written efficiently.
SCSS
div{
p{
color: red;
}
}
Described in a nested structure (like HTML)
See the Pen Sass_scss_nest by engineerhikaru (@engineerhikaru) on CodePen.
Described by referring to the name of the parent selector
See the Pen Sass_scss_parent-reference by engineerhikaru (@engineerhikaru) on CodePen.
Describe what is described in the namespace in CSS (font-family etc.) in a nested structure
See the Pen Sass_scss_namespace-nest by engineerhikaru (@engineerhikaru) on CodePen.
Group frequently used values into variables
See the Pen Sass_scss_variable by engineerhikaru (@engineerhikaru) on CodePen.
Collect frequently used values with array variables
See the Pen Sass_scss_array-variable by engineerhikaru (@engineerhikaru) on CodePen.
Summarize frequently used styles
See the Pen Sass_scss_group-variable by engineerhikaru (@engineerhikaru) on CodePen.
Import the split SCSS file
SCSS
// basic.When reading an SCSS file called scss
@import "basic";
Inherit the style used elsewhere
See the Pen Sass_scss_extend by engineerhikaru (@engineerhikaru) on CodePen.
Change the style depending on the conditions
See the Pen Sass_scss_if-else by engineerhikaru (@engineerhikaru) on CodePen.
Repeat style
See the Pen Sass_scss_for by engineerhikaru (@engineerhikaru) on CodePen.
Repeat using array variables
See the Pen Sass_scss_foreach by engineerhikaru (@engineerhikaru) on CodePen.
Calculate in style
See the Pen Sass_scss_calculation by engineerhikaru (@engineerhikaru) on CodePen.
String concatenation in style
See the Pen Sass_scss_concatenation by engineerhikaru (@engineerhikaru) on CodePen.
Adjust the brightness of the base color
See the Pen Sass_scss_brightness by engineerhikaru (@engineerhikaru) on CodePen.
Adjust base color saturation
See the Pen vYNVVjr by engineerhikaru (@engineerhikaru) on CodePen.
Adjust the transparency of the base color
See the Pen Sass_scss_transparency by engineerhikaru (@engineerhikaru) on CodePen.
Adjust the hue of the base color
See the Pen Sass_scss_hue by engineerhikaru (@engineerhikaru) on CodePen.
Complementary or invert the base color
See the Pen Sass_scss_inversion by engineerhikaru (@engineerhikaru) on CodePen.
Mix the base colors (2)
See the Pen Sass_scss_color-mix by engineerhikaru (@engineerhikaru) on CodePen.
SCSS
//1-line comment
/*
Multi-line comment(Remains after compilation)
*/
Remove quotes ("") from strings
See the Pen Sass_scss_quote by engineerhikaru (@engineerhikaru) on CodePen.
Uppercase or lowercase strings
See the Pen Sass_scss_upper-case by engineerhikaru (@engineerhikaru) on CodePen.
Returns the absolute value of a number
See the Pen Sass_scss_abs by engineerhikaru (@engineerhikaru) on CodePen.
Returns a round-up of numbers
See the Pen Sass_scss_ceil by engineerhikaru (@engineerhikaru) on CodePen.
Returns truncation of numbers
See the Pen Sass_scss_floor by engineerhikaru (@engineerhikaru) on CodePen.
Returns rounding of numbers
See the Pen Sass_scss_round by engineerhikaru (@engineerhikaru) on CodePen.
This content is posted on the site I run for easier viewing, so please use that as well. [Sass] SCSS Notation Cheat Sheet
Recommended Posts