上QQ阅读APP看书,第一时间看更新
Transitioning to using PostCSS
Up until now, we've used SASS to build our demo; granted, it's not a particularly complex one, but as I always say, we must start somewhere!
Our demo is a perfect example of how we can introduce PostCSS to provide replacements for the SASS variables and mixins we've used—for this, we will avail ourselves of three plugins, namely postcss-variables
, postcss-mixins
, and postcss-calc
. The first two should be self-explanatory; the third is required in the replacement font mixin that we've used in our code.
Okay, enough chit-chat, let's get stuck in and begin to alter our code; we'll start with adding variable support.