sources:
- Programmieren mit Mario: https://www.youtube.com/watch?v=Om3XeeSTN0U
- Docs: https://sass-lang.com/
- build with Ruby
- needs Compiler (in Visual Studio Code: 'Live Sass Compiler')
- 2 kinds of syntax:
- Sass syntax: no curly braces, semicolons,
- Scss syntax: looks more like CSS
- enables
- variables,
- nesting (don't go deeper than 3 levels),
- inheritance,
- mixins (re-usable functions),
- each loops
- create
index.htmlandstyle.scss - in VSCode click on 'Watch Sass'
- this creates 2 new files:
style.cssandstyle.css.map - we never write into style.css, because it will get overwritten by the Sass compiler
style.css.mapis for the developers: if you inspect an element in the browser it will show you the origin in yourstyle.scssbecausestyle.css.mapmaps to it. Delete the file and it will only show the styles instyle.css. (Code on and the compiler will create a newstyle.css.map.)
- this creates 2 new files:
- integrate
style.cssintoindex.html.