Selectors, Specificity, and the Cascade
Applying CSS3 to Documents
Publisher: O'Reilly Media
Final Release Date: September 2012
Pages: 86

Exactly how does the "cascade" in Cascading Style Sheets work? This concise guide demonstrates the power and simplicity of CSS selectors for applying style rules to different web page elements. You’ll learn how your page’s presentation depends on a multitude of style rules and the complex ways they function—and sometimes collide—within the document’s structure.

This guide is a chapter from the upcoming fourth edition of CSS: The Definitive Guide. When you purchase either the print or the ebook edition of Selectors, Specificity, and the Cascade, you’ll receive a significant discount on the entire Definitive Guide when it’s released. Why wait when you can learn how to use selectors and other key CSS 3 features right away?

  • Learn how to create CSS rules that apply to a large number of similar elements
  • Group rules to make style sheets smaller and download times faster
  • Understand how elements inherit styles from their parents
  • Discover how reader and browser preferences affect your page presentation
  • Examine specificity—the method browsers use to choose between two conflicting style rules
  • Get a handle on how specificity and inheritance combine to form the cascade
  • Get details on all of the CSS3 selectors
Table of Contents
Product Details
About the Author
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillySelectors, Specificity, and the Cascade
 
4.3

(based on 3 reviews)

Ratings Distribution

  • 5 Stars

     

    (1)

  • 4 Stars

     

    (2)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

100%

of respondents would recommend this to a friend.

Pros

No Pros

Cons

No Cons

Best Uses

  • Intermediate (3)
  • Novice (3)

Reviewed by 3 customers

Displaying reviews 1-3

Back to top

 
5.0

Nice and Detailed Little Book

By Justin

from Atlanta, GA

About Me Developer

Verified Reviewer

Pros

  • Accurate
  • Concise
  • Easy to understand
  • Helpful examples
  • Well-written

Cons

    Best Uses

    • Expert
    • Intermediate
    • Novice
    • Student

    Comments about oreilly Selectors, Specificity, and the Cascade:

    Really enjoyed this nice little book. It deeply explains CSS Selectors so you can better use them to your advantage. Worth a read! Any CSS developer level will understand it.

    (1 of 2 customers found this review helpful)

     
    4.0

    In time you would probably end up here

    By Martin Rowe

    from Tiverton, Devon, UK

    About Me Educator, Maker

    Verified Reviewer

    Pros

    • Accurate
    • Helpful examples

    Cons

      Best Uses

      • Intermediate
      • Novice
      • Student

      Comments about oreilly Selectors, Specificity, and the Cascade:

      This chapter from the upcoming fourth edition of Eric Meyer's CSS: The Definitive Guide contains good explanations and examples of selectors and a clear explanation of specificity, inheritance, and the cascade.

      As you would expect from a chapter on selectors there are good examples of the basics. Meyer then includes very good descriptions and examples of the more difficult attribute selectors, pseudo-class selectors, and pseudo-element selectors. You get the impression that it is all here.

      The parts I liked: there is a very clear section on chaining attribute selectors together to select elements based on the presence of more than one attribute, a very good example explaining the parent-child relationship and the document tree, and the description of pseudo-classes as 'a sort of "phantom class"'.

      If you are new to CSS you may find this book heavy going. One option would be to choose an introductory text. In time you would probably end up here though so a thorough reading of this and some time spent working with and modifying the examples should prove a good investment. This book is the one that should be on your shelf and will probably be the one you reach for when you are getting surprising results from your style sheet and can't understand why.

      Disclosure: I'm writing this post as part of O'Reilly's blogger review program.

      (0 of 1 customers found this review helpful)

       
      4.0

      KISS?

      By DaveP

      from UK

      About Me Developer

      Verified Reviewer

      Pros

      • Concise
      • Easy to understand
      • Well-written

      Cons

        Best Uses

        • Intermediate
        • Novice

        Comments about oreilly Selectors, Specificity, and the Cascade:

        Having used CSS for a number of years, almost randomly, it was useful to find an in-depth tutorial. Each section provides solid examples, rationale and enabled selectors to be used quickly in my own XML/HTML.

        Very clearly written by someone who both knows the subject and can write clearly about it to pass on information.

        No padding, just lots of information. Readily searchable hence should be good as a reference source too.

        Look forward to the other parts of the book.

        [Disclosure. I received a review ebook - recommended format IMHO]

        Displaying reviews 1-3

        Back to top

         
        Buy 2 Get 1 Free Free Shipping Guarantee
        Buying Options
        Immediate Access - Go Digital what's this?
        Ebook:  $8.99
        Formats:  DAISY, ePub, Mobi, PDF
        Print & Ebook:  $10.99
        Print:  $9.99