Advertisement
salmancreation

SCSS - CSS Propertie use

Dec 9th, 2019
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.63 KB | None | 0 0
  1. Properties
  2. As with selectors, we can also nest properties which have related namespaces such as background, font and border. Nested properties are similar to nested selectors. However, you need to include :. Let’s look at an example:
  3. .class-name {
  4.   background: {
  5.     color: rgb(0,0,0);
  6.     position: center;
  7.     size: contain;
  8.   }
  9.   font: {
  10.     size: 1.5rem;
  11.     weight: 300;
  12.     family: ‘open sans’, arial, sans-serif;
  13.   }
  14. }
  15. would compile to:
  16. .class-name {
  17.   background-color: #000000;
  18.   background-position: center;
  19.   background-size: contain;
  20.   font-size: 1rem;
  21.   font-weight: 300;
  22.   font-family: ‘open sans’, arial, sans-serif;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement