first met less

Table of contents

Less's compilation tool

Notes in less

variables in less

Nested rules in less

Less's compilation tool

koala official website: www.koala-app.com

Notes in less

Comments starting with // will not be compiled into the css file

Comments wrapped in /**/ will be compiled into the css file

variables in less

Use @ to declare a variable: @pink:pink

1. Use it as a normal attribute value: use @pink directly

2. Used as a selector and attribute name: #@{value of selector}

3. As url: @{url}

4. Lazy loading of variables

             After koala is compiled:  

Nested rules in less

1. Basic nesting rules

      Note that there is a space before the hover colon  

2. The use of &

               Observe the difference between used &  

mix in less

Blending is the way in which a set of attributes is introduced from one planning set into another

1. Ordinary mixing (disadvantage: it will bring a lot of code duplication)

2. Mixing without output

3. Mixing with parameters

         

4. Mixtures with parameters and default values

         

5. Mixing with multiple parameters

6. Named parameters

         

7. Matching mode

8. arguments variable

 


Guess you like

Origin blog.csdn.net/weixin_42689147/article/details/88694256