Book Image

Sass and Compass for Designers

By : Ben Frain
Book Image

Sass and Compass for Designers

By: Ben Frain

Overview of this book

Table of Contents (17 chapters)
Sass and Compass for Designers
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding experimental support for bleeding edge CSS features


These days, CSS specifications are moving fast. It seems like every day there is an amazing new feature to try out. How can Compass keep up? Sometimes it can't but that doesn't mean it hasn't got us covered when it comes to providing support for experimental features it hasn't already got a prewritten mixin for.

Let's indulge a brief fantasy. A new property has been announced that will automatically add images of sausages behind elements. I know, I know, it'll be a massive time saver.

If such a thing did exist, here is how we might use Compass to add experimental support for different vendors:

.your-own-property {
  @include experimental(sausage, lincolnshire);
}

And here is the CSS that produces:

.your-own-property {
  -webkit-sausage: lincolnshire;
  -moz-sausage: lincolnshire;
  -ms-sausage: lincolnshire;
  -o-sausage: lincolnshire;
  sausage: lincolnshire;
}

Tip

Remember, the vendor stack produced will match what has been set with...