官术网_书友最值得收藏!

  • Mastering Sass
  • Luke Watts
  • 237字
  • 2021-07-14 10:28:19

Chapter 2. Sass – The Road to Better CSS

In this chapter, we will cover:

  • Setting up a simple project based strongly on typography.
  • We'll look at using Sass from the command line and the various options we can pass to take control of our output.
  • We'll then set up our project's configuration variables using !default to allow easy overriding in future. These variables will control all of our functions and mixins and will allow the end user to have full control of our Sass library, without needing to touch mixins or functions.
  • We'll look at writing a small but flexible library of functions and mixins that will deal with setting up a base typography style for our default body, text, and headings. This will be based around the optimal reading line length of 60-80 characters while keeping our font sizes and line heights uniform even when we change font families.
  • We'll write functions and a mixin to handle the output of our headings and keep the best font sizes and line heights for each heading for sans and serif.
  • We'll then look at using lists and nested lists to reduce repetition in our mixins. We'll look at tackling one problem with two different loops and the pros and cons of both approaches.
  • Finally, we'll go back over all of our functions and add some much needed error handling by using @error and @warn.
主站蜘蛛池模板: 鹤壁市| 彩票| 鄂托克前旗| 淮滨县| 彭水| 浑源县| 右玉县| 泗阳县| 正安县| 大庆市| 贞丰县| 天津市| 邻水| 鹤壁市| 永清县| 禄丰县| 西华县| 当涂县| 边坝县| 怀仁县| 南涧| 崇州市| 栾川县| 涞源县| 莱阳市| 句容市| 化隆| 黔西县| 镶黄旗| 叙永县| 双牌县| 海口市| 浙江省| 河津市| 景泰县| 安泽县| 汉中市| 朝阳市| 肥城市| 洪湖市| 页游|