You can perform boolean operations on Sass script by using and, or and not operators.
It directly takes the filename to import and all the imported files will get combined in a single CSS file.
There are two types of mixin arguments:
Nested style is default styling of SASS. This way of styling is very useful when you are dealing with large CSS files.
You can set default values for variables by adding !default flag to the end of the variable value. It will not re-assign the value, if it is already assigned to the variable.
The SassScript values can be taken as arguments in mixins which are given when mixin is include and are available as variable within the mixin.
In @each directive, a variable is defined which contains the value of each item in a list.
SASS supports placeholder selector using class or id selector. In normal CSS, these are specified with "#" or ".", but in SASS they are replaced with "%".
It allows for mathematical operations such as addition, subtraction, multiplication and division.
There are 5 types of operations:
sass --watch C:rubylibsassstyle.scss:style.css
Nesting is combining of different logic structures. Using SASS, we can combine multiple CSS rules within one another. If you are using multiple selectors, then you can use one selector inside another to create compound selectors.
It is used to selectively execute the code statements based on the result of the evaluating an expression.
You can select the parent selector by using the & character. It tells where the parent selector should be inserted.
Compact CSS style competitively takes less space than Expanded and Nested. It focuses mainly on selectors rather than its properties.
It allows using color components along with arithmetic operations.
Parentheses is pair of signs which are usually marked off by round brackets ( ) or square brackets [] which provides symbolic logic that affect the order of operations.
It displays the SassScript expression value as fatal error.
The CSS file that the SASS generates consists of default CSS style which reflects the structure of document. The default CSS styling is good but might not be suitable for all situations.
CSS properties can be declared in two ways −
SASS (Syntactically Awesome Stylesheet) is a CSS pre-processor which helps to reduce repetition with CSS and saves time. It is more stable and powerful CSS extension language that describes style of document cleanly and structurally.
In expanded output styling, each property and rule has its own line. It takes more space compared to nested CSS style.
It detects the errors and display the SassScript expression values to the standard error output stream.
You can use = for @mixin directive and + for @include directive which requires less typing and makes your code simpler, and easier to read.
Comments take up entire line and enclose all the text nested under them and they are line-based in indented syntax.
It provides SassScript variables in selectors and property names using #{ } syntax. You can specify variables or property names within the curly braces.
Using function directive, you can create your own function and use them in your script context or can be used with any value.
It is used to define the mixins that includes optionally the variables and argument after the name of the mixin.
It set style rule to different media types.
SassScript supports seven main data types:
It allows you to generate styles in a loop. The counter variable is used to set the output for each iteration.
You can use SASS in three different ways:
The @else if statements are used with the @if directive, whenever the @if statement fails then the @else if statements are tried and if they also fails then the @else is executed.
It is a collection of nested rules which is able to make style block at root of the document.
Compressed CSS style takes least amount of space compared to all other styles. It provides whitespaces only to separate selectors and newline at the end of the file.
It is used to share rules and relationships between selectors. It can extend all another class styles in one class and can also apply its own specific styles.
It is used to include arguments in the mixins. The arguments which are named can be passed in any order and the default values of argument can be omitted.
Variable arguments are used to pass any number of arguments to mixin. It contains keyword arguments passed to the function or mixin.
SASS supports two syntaxes namely SCSS and Indented syntax.
It evaluates SassScript expression using command line. You can run the shell with the sass command line along with -i option.
sass input.scss output.css
Sass supports two types of comments −
It is used to include the mixin in the document and styles defined by the mixin can be included into the current rule.
Lists represent series of values which are separated using commas or space.