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

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!

主站蜘蛛池模板: 九寨沟县| 武邑县| 鄂尔多斯市| 华安县| 文安县| 星子县| 拜城县| 辛集市| 汝阳县| 昭通市| 通江县| 安塞县| 彩票| 商都县| 沾化县| 黎平县| 张家口市| 鲁山县| 个旧市| 石屏县| 雅安市| 南岸区| 仲巴县| 九龙县| 凯里市| 通榆县| 长治县| 前郭尔| 南皮县| 静海县| 兰坪| 榆中县| 惠州市| 宜春市| 安塞县| 来宾市| 萝北县| 山阴县| 凌云县| 鸡西市| 高碑店市|