Free Sample
+ Collection

Instant SASS CSS How-to

Alex Libby

Learn to write more efficient CSS with the help of the SASS CSS library using practical, hands-on recipes
RRP $12.99

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781782163787
Paperback80 pages

About This Book

  • Learn something new in an Instant! A short, fast, focused guide delivering immediate results.
  • Learn how to download and install SASS and compile SASS code to validate CSS
  • Learn how to use the various elements of SASS, such as mixins, variables, control directives, and functions to create valid CSS
  • Use an external mixin library such as Compass with SASS to produce exciting effects and learn to create your own mixin library

Who This Book Is For

This book is great for those new to using CSS pre-processors such as SASS, and who are looking to get a good grounding in how to use SASS. It’s assumed you will have some experience in using HTML and CSS already; it is likely you will be responsible for maintaining at least one website (the larger the better), and are keen to learn how you can use SASS to help make it easier to manage your CSS styles. Although SASS is powered by Ruby, it is not essential to already be familiar with Ruby for the purposes of completing the recipes in this book.

Table of Contents

Chapter 1: Instant SASS CSS How-to
Downloading and installing SASS (Must know)
Adding support to text editors (Must know)
Pre-compiling SASS (Must know)
Viewing SASS in a browser (Become an expert)
Using nested rules (Must know)
Using comments in SASS (Should know)
Getting interactive with Script (Become an expert)
Using CSS-3 directives in SASS (Must know)
Controlling output in SASS (Must know)
Creating and using mixins (Must know)
Building functions within SASS (Must know)
Altering output style (Should know)
Using a pre-built mixin library (Should know)
Writing mixins – developing a style (Must know)
Downloading and installing Compass (Should know)
Creating sprites using Compass and SASS (Become an expert)
Using vendor prefixes and Compass (Become an expert)
Building a slider using Compass (Become an expert)
Using SASS with Wordpress (Become an expert)
Using Compass in WordPress (Become an expert)
The different versions of SASS – an explanation
A template for the book recipes

What You Will Learn

  • Installing and using SASS in your site
  • Compiling SASS code to produce valid CSS that you can use in your site’s pages
  • Using variables, functions, mixins, control, and CSS-3 directives and operators in your SASS code
  • Viewing SASS code in your browser
  • Employing external mixin libraries such as Compass to add extra functionality to SASS
  • Using SASS and Compass within CMS environments such as Wordpress
  • Creating, importing, or using existing pre-built mixin libraries in your projects
  • Altering your CSS output style in SASS, depending on your requirements

In Detail

CSS styling has been a key part of developing for the Internet since the early 1990s, but unlike JavaScript, has suffered from the inability to produce dynamic styles, using functions, operators, and variables. SASS uses the power of Ruby to bring support for all three and more to your CSS, allowing you to engage in a more efficient, modular style of working, and making it easier to maintain your CSS styling in your projects.

Instant SASS CSS How-to is a practical, hands-on guide that provides you with a number of clear step-by-step exercises, which will help you take advantage of the power of SASS, and give you a good grounding in writing and compiling CSS style sheets using the SASS pre-processor language.

This book looks at how you can incorporate SASS into your web pages, and either produce style sheets dynamically, or pre-compile them before including the final article into your site’s pages.

You will also learn how you can use the power of mixins, functions, and variables to help produce style sheets, and reduce the amount of code you need to write in your style sheets. We will also take a look at how you can incorporate a more modular style to your development workflow, which will help with making style sheets more manageable and easier to update in the future. We will also take a look at how you can build up libraries of reusable code that you can incorporate into your future projects.

You will learn everything you need to know to start using SASS to help produce more efficient style sheets in your site’s pages, and adopt a more modular development workflow, which will make it easier to maintain your sites in the future.


Read More