Tuesday, 13 June 2017

12.06.2017.
Monday.



scss functions


Arithmatic and color
color function
for loops
each loops
conditionals

 Mixins should only be used if they take in an argument, otherwise, you should extend the selector's rules, whether it be a class, id, or placeholder.



 color function
color: red + blue;

 Arithmatic

The Sass arithmetic operations are:
  1. addition +
  2. subtraction -
  3. multiplication *
  4. division /, and
  5. modulo %
 division:
  1. If the value, or any part of it, is stored in a variable or returned by a function.
  2. If the value is surrounded by parentheses, unless those parentheses are outside a list and the value is inside.
  3. If the value is used as part of another arithmetic expression.

 Each loop


Each loops in Sass iterate on each of the values on a list. The syntax is as follows:
@each $item in $list { //some rules and or conditions }
The value of $item is dynamically assigned to the value of the object in the list according to its position and the iteration of the loop.


 For loop


@for $i from $begin through $end { //some rules and or conditions }
In the example above:
  1. $i is just a variable for the index, or position of the element in the list
  2. $begin and $end are placeholders for the start and end points of the loop.
  3. The keywords through and to are interchangeable in Sass


No comments:

Post a Comment

Machine Learning Annotation Introduction

Data annotation in Machine Learning is the process of annotating/ labeling data to categorize the dataset to identify by ML models. It can b...