Colors, Backgrounds, and Gradients
Chapter 9
Figures
- Declared color versus default color
- Changing colors
- Border colors are taken from the content’s color
- Setting the border color for images
- Changing form element foregrounds
- Different colors for different elements
- Backgrounds and padding
- A reverse-text effect for H1 elements
- The results of a more complicated stylesheet
- Using background and border to two-tone an image
- The three box-oriented types of background clipping
- Clipping the background to text
- Applying a background image in CSS
- Applying background images to block and inline elements
- Adding link icons as background images
- What inherited backgrounds would do to layout
- The consequences of a missing background image
- Centering a single background image
- Placing the background image in the top-right corner of paragraphs
- Declaring only one percentage value means the vertical position evaluates to 50
- Various percentage positions
- Offsetting the background image using length measures
- Mixing percentages and length values
- Using negative length values to position the origin image
- Varying effects of negative percentage values
- Changing the offset edges for the origin image
- Inferred zero-length offsets
- The three types of background origins
- The three types of background origins, redux
- When origin and clipping diverge
- Tiling the background image vertically
- Tiling the background image horizontally
- Placing a single large background image
- Bordering elements with background images
- Centering the origin image and repeating it
- The difference between centering a repeat and starting it from the top left
- Tiling the background image with filler space
- Spaced-out tiling with different intervals
- Spacing along one axis but not the other
- Tiling the background image with scaling
- Rounded background images that are clipped
- Clipping due to mismatched clip and origin values
- Nailing the background in place
- The centering continues to hold
- Default-attach versus local-attach
- Perfect alignment of backgrounds
- The complexspiral distorted
- Resizing the origin image
- Distorting the origin image by resizing it
- Resizing the origin image with percentages
- Covering the background with the origin image
- Covering the background with the origin image, redux
- Containing the origin image within the background
- Repeating a contained origin image
- Covering, containing, positioning, and clipping
- Using shorthand
- Multiple background images
- Individually positioning background images
- Multiple background layers via shorthand
- The order of background layers
- Obscuring layers with repeated images
- Placing the same image in all four corners
- The progression of a simple gradient
- Simple linear gradients
- Fading to white versus fading to transparent
- The distribution of color stops along the gradient line
- Placing color stops every 25 pixels
- Gradient clipping when colors stops go too far
- Gradient clipping when color stops have negative positions
- Placing color stops every 10 percent
- Distributing color stops between explicitly placed stops
- The effect of coincident color stops
- Hard-stop stripes
- Handling color stops that are out of place
- Linear blending from one color stop to the next
- Black-to-gray with differing midpoint hints
- Comparing two linear gradients to one hinted transition
- The placement and sizing of the gradient line
- The calculation of color along the gradient line
- The extension of selected colors along the gradient line
- How gradients are constructed for various images
- A gradient with stops beyond the start and ending points
- A gradient headed toward the top right
- Examples of the side effects of a quadrant-directed gradient
- A simple radial gradient in multiple settings
- Simple radial gradients
- Percentage-sized elliptical gradients
- The effects of radial gradient sizing keywords
- Changing the center position of radial gradients
- Changing the center position of explicitly sized radial gradients
- Adding a color stop
- The gradient ray and some of the ellipses it spawns
- Setting the gradient ray’s ending point
- Color stops beyond the ending point
- Handling a negative color-stop position
- The effects of a zero-width ellipse
- Very, very tall ellipses
- Tiled radial gradient images
- It’s time to start the music…
- The two “fold” gradients
- Tiling gradient images with background-repeat
- A repeating gradient image with repeating-linear-gradient
- Dealing with hard resets in repeating-gradient images
- Repeated tiling of repeating-gradient images
- Repeating radial gradients
- A simple box shadow
- Box shadows are incomplete
- Various blurred and spread shadows
- Various inset shadows