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

  • INSTANT SASS CSS How-to
  • Alex Libby
  • 281字
  • 2021-07-29 16:56:39

Preface

Imagine the following scenario:

You're an accomplished developer, working on a high profile project for a demanding client. You're normally a fairly patient kind of person, but even this client is proving a little bit too much of a challenge…when you get that phone call you dread.

"Alex…you know those buttons you kindly changed for me last week? I'm really sorry, but could we please try a different color, as the boss really doesn't like that shade of red!"

This is where you silently curse – that's more than 60 buttons, littered with browser-specific CSS prefixes; a real pain in the neck, which you could well do without, particularly as it took you a couple of hours to make the changes last time. (Yes, it's a big site, before you ask!). Sounds familiar? Wish there was another way to do this? I thought so – welcome to the world of SASS!

SASS, I hear you ask? What's this all about then? Well, I could give you the technical low-down, but it's probably better demonstrated by the use of an example. Do you remember those 60 buttons I mentioned earlier? What if you could change the color of all of those buttons in one go? Yes, you read right, all of those buttons. This is just a small part of what SASS can achieve, as a superset of CSS3. We can use the power of SASS to set a variable that you could use to change the color value set against all buttons in one go, with a single click.

Intrigued? We will look at this and more throughout this book, so let's make a start…

主站蜘蛛池模板: 正宁县| 武山县| 茂名市| 海盐县| 三原县| 九龙坡区| 大竹县| 定陶县| 崇仁县| 婺源县| 中西区| 剑川县| 乌兰浩特市| 邯郸县| 阿荣旗| 乐业县| 卢湾区| 台东县| 宾阳县| 抚顺县| 萨嘎县| 普兰店市| 当雄县| 金塔县| 仪征市| 巴林右旗| 乐昌市| 库伦旗| 新乡市| 来宾市| 中西区| 绥芬河市| 台山市| 曲阜市| 金川县| 台南县| 凤山市| 正定县| 攀枝花市| 务川| 绥中县|