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

Chapter 2. Creating Variables and Mixins

A question: how often have you created components such as buttons, where you've used very similar colors multiple times throughout your code? It's a real pain to manually alter. Using a preprocessor such as SASS or Less makes it easier, but with the overhead of a full-sized library.

Can we do it differently? Absolutely; throughout the next few chapters, we'll explore different elements of PostCSS, before pulling it all together to produce a preprocessor application later in the book. We'll begin our journey with a look at using variables and mixins; we'll explore the basics of creating them first, before transitioning to support using PostCSS. In this chapter, we'll cover the following topics:

  • An overview of creating variables and mixins using existing preprocessors
  • Transitioning to using PostCSS equivalents
  • Adding mixin support to PostCSS
  • Examining the differences between standard preprocessors and PostCSS

Let's get cracking!

主站蜘蛛池模板: 观塘区| 三都| 溆浦县| 吉木萨尔县| 湘乡市| 桦川县| 望都县| 平安县| 平潭县| 旬阳县| 邵东县| 准格尔旗| 上高县| 寻甸| 蓬莱市| 桃江县| 沅陵县| 舟曲县| 宁波市| 仁化县| 盐源县| 台北市| 红桥区| 莲花县| 阳谷县| 资中县| 蒙自县| 青龙| 伊春市| 丰镇市| 龙泉市| 尼玛县| 江安县| 惠州市| 六安市| 福州市| 颍上县| 内丘县| 申扎县| 青岛市| 兰坪|