Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Selectors, Specificity, and the Cascade
Preface
Conventions Used in This Book
Using Code Examples
SafariĀ® Books Online
How to Contact Us
1. Selectors
Basic Style Rules
Element Selectors
Declarations and Keywords
Grouping
Grouping Selectors
The universal selector
Grouping Declarations
Grouping Everything
Class and ID Selectors
Class Selectors
Multiple Classes
ID Selectors
Deciding Between Class and ID
Attribute Selectors
Simple Attribute Selectors
Selection Based on Exact Attribute Value
Selection Based on Partial Attribute Values
Matching one word in a space-separated list
Matching a substring within an attribute value
Matching a substring at the beginning of an attribute value
Matching a substring at the end of an attribute value
A Particular Attribute Selection Type
Using Document Structure
Understanding the Parent-Child Relationship
Descendant Selectors
Selecting Children
Selecting Adjacent Sibling Elements
Selecting Following Siblings
Pseudo-Class Selectors
Combining Pseudo-Classes
Structural Pseudo-Classes
Selecting the root element
Selecting empty elements
Selecting unique children
Selecting first and last children
Selecting first and last of a type
Selecting every nth child
Selecting every nth of a type
Dynamic Pseudo-Classes
Hyperlink pseudo-classes
User action pseudo-classes
Real-world issues with dynamic styling
UI State Pseudo-Classes
Enabled and disabled UI elements
Check states
The :target Pseudo-Class
The :lang Pseudo-Class
The Negation Pseudo-Class
Pseudo-Element Selectors
Styling the First Letter
Styling the First Line
Restrictions on ::first-letter and ::first-line
Styling (Or Creating) Content Before and After Elements
Summary
2. Specificity and the Cascade
Specificity
Declarations and Specificity
Universal Selector Specificity
ID and Attribute Selector Specificity
Inline Style Specificity
Importance
Inheritance
The Cascade
Sorting by Weight and Origin
Sorting by Specificity
Sorting by Order
Non-CSS Presentational Hints
Summary
About the Author
Copyright
← Prev
Back
Next →
← Prev
Back
Next →