CSS Secrets

Book description

In this practical guide, CSS expert Lea Verou provides 47 undocumented techniques and tips to help intermediate-to advanced CSS developers devise elegant solutions to a wide range of everyday web design problems.

Rather than focus on design, CSS Secrets shows you how to solve problems with code. You'll learn how to apply Lea's analytical approach to practically every CSS problem you face to attain DRY, maintainable, flexible, lightweight, and standards-compliant results.

Inspired by her popular talks at over 60 international web development conferences, Lea Verou provides a wealth of information for topics including:

  • Backgrounds and Borders
  • Shapes
  • Visual Effects
  • Typography
  • User Experience
  • Structure and Layout
  • Transitions and Animations

Publisher resources

View/Submit Errata

Table of contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Dedication
  5. Secrets by Specification
  6. Foreword
  7. Preface
  8. Words of thanks
  9. Making of
  10. About this book
  11. Chapter 1. Introduction
    1. Web standards: friend or foe?
    2. CSS coding tips
  12. Chapter 2. Backgrounds & Borders
    1. 1 Translucent borders
    2. 2 Multiple borders
    3. 3 Flexible background positioning
    4. 4 Inner rounding
    5. 5 Striped backgrounds
    6. 6 Complex background patterns
    7. 7 (Pseudo)random backgrounds
    8. 8 Continuous image borders
  13. Chapter 3. Shapes
    1. 9 Flexible ellipses
    2. 10 Parallelograms
    3. 11 Diamond images
    4. 12 Cutout corners
    5. 13 Trapezoid tabs
    6. 14 Simple pie charts
  14. Chapter 4. Visual Effects
    1. 15 One-sided shadows
    2. 16 Irregular drop shadows
    3. 17 Color tinting
    4. 18 Frosted glass effect
    5. 19 Folded corner effect
  15. Chapter 5. Typography
    1. 20 Hyphenation
    2. 21 Inserting line breaks
    3. 22 Zebra-striped text lines
    4. 23 Adjusting tab width
    5. 24 Ligatures
    6. 25 Fancy ampersands
    7. 26 Custom underlines
    8. 27 Realistic text effects
    9. 28 Circular text
  16. Chapter 6. User Experience
    1. 29 Picking the right cursor
    2. 30 Extending the clickable area
    3. 31 Custom checkboxes
    4. 32 De-emphasize by dimming
    5. 33 De-emphasize by blurring
    6. 34 Scrolling hints
    7. 35 Interactive image comparison
  17. Chapter 7. Structure & Layout
    1. 36 Intrinsic sizing
    2. 37 Taming table column widths
    3. 38 Styling by sibling count
    4. 39 Fluid background, fixed content
    5. 40 Vertical centering
    6. 41 Sticky footers
  18. Chapter 8. Transitions & Animations
    1. 42 Elastic transitions
    2. 43 Frame-by-frame animations
    3. 44 Blinking
    4. 45 Typing animation
    5. 46 Smooth state animations
    6. 47 Animation along a circular path
  19. Index
  20. Footnotes

Product information

  • Title: CSS Secrets
  • Author(s): Lea Verou
  • Release date: June 2015
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781449372637