You are previewing Instant SASS CSS How-to.
O'Reilly logo
Instant SASS CSS How-to

Book Description

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

  • 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

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.

Table of Contents

  1. Instant SASS CSS How-to
    1. Instant SASS CSS How-to
    2. Credits
    3. About the Author
    4. About the Reviewer
    5. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    6. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    7. 1. Instant SASS CSS How-to
      1. Downloading and installing SASS (Must know)
        1. Getting ready
        2. How to do it...
        3. How it works...
      2. Adding support to text editors (Must know)
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Pre-compiling SASS (Must know)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      4. Viewing SASS in a browser (Become an expert)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more…
      5. Using nested rules (Must know)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      6. Using comments in SASS (Should know)
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Getting interactive with Script (Become an expert)
        1. Getting ready
        2. How to do it...
        3. How it works...
      8. Using CSS-3 directives in SASS (Must know)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      9. Controlling output in SASS (Must know)
        1. Getting ready
        2. How to do it...
        3. How it works...
      10. Creating and using mixins (Must know)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      11. Building functions within SASS (Must know)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      12. Altering output style (Should know)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      13. Using a pre-built mixin library (Should know)
        1. Getting ready
        2. How to do it...
        3. How it works...
      14. Writing mixins – developing a style (Must know)
        1. Getting ready
        2. How to do it...
        3. How it works...
      15. Downloading and installing Compass (Should know)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      16. Creating sprites using Compass and SASS (Become an expert)
        1. Getting ready
        2. How to do it...
        3. How it works...
      17. Using vendor prefixes and Compass (Become an expert)
        1. Getting ready
        2. How to do it...
        3. How it works...
      18. Building a slider using Compass (Become an expert)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      19. Using SASS with Wordpress (Become an expert)
        1. Getting ready
        2. How to do it...
        3. How it works...
      20. Using Compass in WordPress (Become an expert)
        1. Getting ready
        2. How to do it...
        3. How it works...
      21. The different versions of SASS – an explanation
      22. A template for the book recipes