Every entry, one line each. Highlighted ones have a detailed example below — click to jump there.
- :hover
- Matches while the pointer is over the element
- :focus
- Matches while the element has keyboard focus
- :focus-visible
- Matches focus only when it should be visibly indicated
- :active
- Matches while the element is being activated
- :disabled
- Matches a disabled form element
- :checked
- Matches a checked checkbox, radio, or option
- :user-valid / :user-invalid
- Like :valid/:invalid, but only after the user has interacted
- :first-child
- Matches an element that is the first child of its parent
- :last-child
- Matches an element that is the last child of its parent
- :nth-child(n)
- Matches elements by their position among siblings
- :empty
- Matches an element with no children
- :not(sel)
- Matches anything not matching the given selector
- :is() / :where()
- Groups selectors; :where() always contributes zero specificity
- :has()
- The relational pseudo-class — matches an element whose descendants (or later siblings) match, not just "parent"
- ::before / ::after
- Generated content inserted before/after the content box
- ::placeholder
- Styles the placeholder text of a form field
- ::selection
- Styles the portion of text selected by the user
- ::marker
- Styles the bullet/number of a list item
- !important
- Overrides normal cascade order — not a specificity level, a separate importance flag
- inline style
- An element's own style attribute beats any stylesheet selector except !important
- @layer
- Names a cascade layer — layers are ordered before specificity is even consulted
- @scope
- Limits a block of rules to a subtree, with an optional lower boundary
- display
- How an element participates in layout: block, inline, flex, grid, none
- box-sizing
- Whether width/height include padding and border
- width / height
- The content box size, unless box-sizing says otherwise
- min-width / max-width
- Clamps the computed width — max-width wins over width
- min-height / max-height
- Clamps the computed height in the block direction
- margin
- Space outside the border; vertical margins collapse in flow layout
- padding
- Space inside the border, around the content
- border
- Shorthand for border-width, border-style and border-color
- border-radius
- Rounds corners; a percentage or a huge px value gives a pill
- outline
- A ring drawn outside the border that takes up no layout space
- overflow
- What happens to content that exceeds the box: visible, hidden, auto, clip
- position
- static, relative, absolute, fixed or sticky positioning scheme
- inset
- Shorthand for top, right, bottom and left on a positioned element
- z-index
- Stacking order among positioned siblings in the same stacking context
- aspect-ratio
- Locks the box to a width:height ratio, reserving space before load
- object-fit
- How a replaced element (img, video) fills its box: cover, contain, fill
- object-position
- Which part of the image survives an object-fit: cover crop
- float
- Pulls an element to one side and lets inline content wrap around it
- visibility
- Hides an element while keeping its space in the layout
- margin-inline / padding-block
- Logical properties — map to physical sides based on writing direction
- flex-direction
- Which way the main axis runs: row, row-reverse, column, column-reverse
- flex-wrap
- Whether items overflow onto additional lines instead of shrinking
- align-content
- Distributes wrapped lines along the cross axis — needs flex-wrap
- align-self
- Overrides align-items for one individual item
- flex
- Shorthand for flex-grow, flex-shrink and flex-basis
- flex-grow
- Share of leftover free space this item absorbs
- flex-shrink
- How readily the item gives up space when the line overflows
- flex-basis
- The item's starting size before grow/shrink is applied
- order
- Reorders items visually without touching the DOM — skips screen readers
- gap
- Space between flex or grid tracks, with no margin on the outer edges
- grid-template-rows
- Defines the explicit row tracks
- grid-template-areas
- Names regions in ASCII art so items can be placed by name
- grid-auto-flow
- How auto-placed items fill the grid: row, column, or dense backfill
- grid-auto-rows
- Size of implicitly created rows beyond the explicit template
- grid-column
- Start/end column lines for an item — "1 / -1" spans every column
- grid-row
- Start/end row lines for an item, or a span count
- grid-area
- Places an item by named area, or by all four grid lines at once
- justify-items
- Inline-axis alignment of every item inside its own cell
- place-items
- Shorthand for align-items and justify-items — "center" centers anything
- place-content
- Shorthand for align-content and justify-content
- font-family
- Prioritized list of typefaces, ending in a generic family
- font-size
- Text size; rem keeps it tied to the user's browser setting
- font-weight
- 100–900; variable fonts accept any value between the named steps
- font-style
- normal, italic, or oblique with an optional angle
- line-height
- Leading between lines; a unitless number scales with font-size
- letter-spacing
- Tracking between characters — usually tightened on large headings
- text-align
- Horizontal alignment of inline content: left, center, right, justify
- text-transform
- Renders text as uppercase, lowercase or capitalize without changing the DOM
- text-decoration
- Underline, overline or line-through, with color, style and thickness
- text-underline-offset
- Pushes the underline away from the baseline for legibility
- text-wrap
- balance evens out short headings; pretty avoids an orphaned last word
- text-overflow
- How clipped inline text is signaled — "ellipsis" needs overflow: hidden
- white-space
- Whether whitespace collapses and text wraps: normal, nowrap, pre, pre-wrap
- text-shadow
- Offset, blur and color drawn behind the glyphs
- @font-face
- Defines a custom font to load and use by name
- color
- Foreground text color, and the default for currentColor and borders
- opacity
- Transparency of the whole element and its children, 0 to 1
- background-color
- Solid fill painted behind the content, under any background image
- background-image
- One or more images or gradients, first layer on top
- background-size
- cover, contain, or explicit dimensions for each background layer
- background-position
- Where the background image is anchored within the box
- background-repeat
- Whether the image tiles, and along which axis
- background-clip
- Which box the background stops at — "text" clips it to the glyphs
- box-shadow
- Offset, blur, spread and color — inset draws it inside the border
- filter
- Graphical effects on the element: blur, brightness, saturate, drop-shadow
- backdrop-filter
- Applies a filter to whatever sits behind the element — frosted glass
- mix-blend-mode
- How the element composites with the backdrop: multiply, screen, overlay
- accent-color
- Tints native checkboxes, radios, range sliders and progress bars
- color-scheme
- Tells the browser which themes you support, so native UI follows
- transition
- Shorthand: property, duration, timing function, delay
- transition-duration
- How long the transition takes; 0s means no transition
- transition-timing-function
- The easing curve: ease, linear, steps(), cubic-bezier()
- transition-delay
- Wait time before the transition starts
- animation
- Shorthand for name, duration, easing, delay, count, direction, fill
- animation-duration
- Length of one cycle of the keyframe animation
- animation-iteration-count
- How many times to run — a number, or infinite
- animation-direction
- normal, reverse, alternate — whether cycles play backwards
- animation-fill-mode
- Whether the first/last keyframe sticks before and after the run
- @starting-style
- Defines a from-state so a transition can fire on first appearance (e.g. display: none → shown)
- transform
- Visually translate, rotate, scale or skew without affecting layout
- transform-origin
- The pivot point that rotation and scaling happen around
- translate / rotate / scale
- Individual transform properties — animate independently of each other
- perspective
- Distance to the viewer, giving child 3D transforms real depth
- will-change
- Hints an upcoming change so the browser can promote a layer — use sparingly
- --*
- Declares a custom property; inherits and is live in the DOM
- var()
- Reads a custom property, with an optional fallback second argument
- @property
- Registers a custom property with a type, so it can animate
- @media
- Applies styles conditionally based on device/viewport features
- @supports
- Applies styles only if the browser supports a given feature
- container-type
- Makes an element a query container: inline-size, size, or normal
- container-name
- Labels a container so @container can target it specifically
- @container
- Styles a descendant based on its container's size, not the viewport's
- clamp()
- clamp(min, preferred, max) — fluid sizing with no media query
- min() / max()
- Picks the smaller or larger of comparable values at computed time
- calc()
- Mixes units in one expression: calc(100% - 2rem)
- dvh / svh / lvh
- Dynamic, small and large viewport height — account for mobile browser chrome
- cursor
- Which pointer shape appears over the element
- pointer-events
- "none" makes an element transparent to clicks and hovers
- user-select
- Whether the user can select the text inside
- list-style
- Marker type, position and image for list items
- content
- Sets the generated content of ::before and ::after — required for them to render
- appearance
- "none" strips the browser's native styling from a form control
- scroll-behavior
- "smooth" animates jumps from anchor links and scrollTo()
- scroll-snap-type
- Turns a scroll container into a snapping carousel: x, y, mandatory, proximity
- scroll-snap-align
- Which edge of a child snaps to the container: start, center, end
- scroll-margin-top
- Offsets an anchor target so a sticky header does not cover it
- overscroll-behavior
- "contain" stops scroll chaining from a modal to the page behind it
- clip-path
- Clips the element to a shape: inset(), circle(), polygon(), path()
- writing-mode
- Runs text vertically or horizontally, remapping block and inline axes
- content-visibility
- "auto" skips rendering off-screen subtrees for faster paints