Comprehensive CSS Properties Demo

A single-file dark-mode reference page showing a wide range of standard CSS capabilities: colors, typography, box model, display, positioning, flexbox, grid, borders, effects, transitions, animation, forms, tables, columns, overflow, pseudo-selectors, and responsive behavior.

1. Typography & Text

Font families, font weight, text decoration, transform, line height, letter spacing, writing mode, ellipsis, wrapping, indentation, and gradient text.

Type Scale

H1 Heading

H2 Heading

H3 Heading

H4 Heading

H5 Heading
H6 Heading

Font Families

Serif sample

Sans-serif sample

Monospace sample

Cursive sample

Fantasy sample

Weights & Style

Weight 100

Weight 300

Weight 500

Weight 700

Weight 900 italic

Text Decoration

Underline basic

Underline offset

Line-through decoration

Overline decoration

Overline and Underline decoration

Underline with dots

Underline with wave

Underline with offset and style

Text shadow emphasis

Text shadow layers

Case, Spacing, Variant

Uppercase tracking

Small caps example

Tight letter spacing

Loose letter spacing

Line Height & Indent

Tight line-height can make text feel compact and dense across multiple lines. Tight line-height can make text feel compact and dense across multiple lines. Tight line-height can make text feel compact and dense across multiple lines.

Indented paragraph with looser line-height for a more editorial layout feeling. Indented paragraph with looser line-height for a more editorial layout feeling. Indented paragraph with looser line-height for a more editorial layout feeling.

Wrapping & Ellipsis

superlongtokenthatwouldnormallyoverflowbutnowwrapsanywherebecauseoverflow-wrapisactive

This is a long line clipped with white-space, overflow hidden, and text-overflow ellipsis.

Writing Mode

Vertical text flow demo. Vertical text flow demo. Vertical text flow demo. Vertical text flow demo

Gradient Text

CSS can paint text with backgrounds

White Space

normal

  Line    with    tabs
  and    multiple      spaces
  that collapse

nowrap

  Line    with    tabs and spaces that will not wrap even if very very long

pre

  Line    with    tabs
  and    multiple      spaces
  preserved exactly

pre-wrap

  Line    with    tabs and long content that will wrap
  but spacing is preserved

pre-line

  Line    with    tabs
  multiple spaces collapse
  but line breaks stay

break-spaces

  Line    with    tabs
  spaces are preserved AND wrap

Tab Size

tab-size: 2

  1	2	3	4
  columns align tighter

tab-size: 4 (default)

  1	2	3	4
  standard spacing

tab-size: 8

  1	2	3	4
  wide tab spacing

Sup / Sub (default browser behavior)

H2O    E = mc2

Custom Sup / Sub with CSS

H2O    E = mc2

Inline Text Alignment

baseline: A B
middle: A B
top: A B
bottom: A B
text-top: A B
text-bottom: A B

Numeric Vertical Align Offsets

+5px: A B
-5px: A B

Inline-block vs Image Alignment

image baseline issue: text
fixed with middle: text

2. Box Model, Sizing, Overflow

Padding, border, margin, outline, box-shadow, width/height, min/max, resize, and overflow behaviors.

Box Model Layers

padding, border, margin, outline, shadow, overflow, resize

Sizing Variants

fixed
%
min/max

3. Display, Visibility, Opacity

Shows block, inline, inline-block, hidden visibility, opacity, and display contents.

Display Modes

inline inline-block
block
hidden opacity .5

Display: contents

Wrapper disappears Children remain In layout flow

4. Positioning

Relative and absolute placement inside a positioned container, plus sticky positioning inside a scroll area.

Relative / Absolute

relative
absolute
bottom/left

Sticky

Sticky header

Scroll this panel to see the sticky element pin to the top of its scroll container.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris luctus, odio non tincidunt maximus, neque tortor sodales velit, vel faucibus ipsum nunc sed erat.

Praesent fermentum, neque a volutpat ultricies, turpis ligula vestibulum mi, sed elementum augue arcu vel lacus.

Vivamus luctus nisl sed iaculis luctus. Integer convallis leo non mi feugiat, vel faucibus magna volutpat.

Header2

Scroll this panel to see the sticky element pin to the top of its scroll container.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris luctus, odio non tincidunt maximus, neque tortor sodales velit, vel faucibus ipsum nunc sed erat.

Praesent fermentum, neque a volutpat ultricies, turpis ligula vestibulum mi, sed elementum augue arcu vel lacus.

Vivamus luctus nisl sed iaculis luctus. Integer convallis leo non mi feugiat, vel faucibus magna volutpat.

5. Flexbox

Direction, alignment, justification, wrapping, flex-grow, flex-basis, align-self, and order.

Row / Center / Space Between

A
grow
C

Column + Self Alignment

1
self-end
order-last

Wrapping

basis
2
3
4
5
6

Justify Center

X
Y
Z

6. Grid Layout

Grid tracks, gaps, spanning, auto rows, placement, and named template areas.

Grid Tracks / Spans

span 2
B
row 2
D
self
F

Named Areas

header
main
side

7. Borders, Radius, Clipping, Masking

Border styles, asymmetric radii, clip-path shapes, and mask-image.

Solid Border

solid

Dashed Border

dashed

Dotted Border

dotted

Double Border

double

Clip Path

Mask Image

Border Radius

mixed radius

Outline

outline

Box Shadow

box-shadow x 30

8. Color, Backgrounds, Blending

Demonstrates color, background, gradients, layered backgrounds, blend modes, CSS variables, and theming tokens.

Solid Background

Linear Gradient

Linear Multi-Stop

Radial Gradient

Radial Spotlight

Conic Gradient

Conic Segments

Repeating Linear

Repeating Radial

Layered Gradients

Mesh Style

Image + Overlay

Blend Mode

Theme Tokens

--bg --panel --text --accent

Text Colors

Muted foreground

Success accent

Warning accent

Danger accent

9. Effects, Filters, Transforms, Transitions, Animation

Includes transform, transform-origin, perspective, transitions, filter, drop-shadow, backdrop-filter, and keyframe animation.

Transform + Transition

Hover me

Image Filters

demo demo

Backdrop Filter

This panel uses a translucent background with backdrop-filter blur and saturation.

10. Lists, Tables, Forms

List styling, table formatting, form controls, focus states, placeholder styling, disabled state, and accent color.

Lists

  • Custom marker via pseudo-element
  • Controlled spacing and list reset
  • Useful for navs and feature lists

Table

Table with border-collapse, caption-side, fixed layout, and aligned cells
PropertyEffectExample
border-collapseMerges bordersUsed here
table-layoutControls column sizingfixed
vertical-alignCell content alignmenttop

Form Controls

11. Columns, Overflow, Scroll Snap

Multi-column layout, overflow scrolling, scroll snapping, overscroll behavior, and scroll-behavior on the document.

Multi-Column Text

CSS multi-column layout can flow long text into newspaper-like columns using the columns shorthand.

Column gaps and rules help separate content visually without building a full grid.

This is useful for editorial layouts, compact reference material, and some dashboard summaries.

The property works best on flowing text content rather than rigid UI structures.

Horizontal Scroll Snap

Snap 1

Scroll horizontally.

Snap 2

Each panel snaps into place.

Snap 3

Useful for carousels and galleries.

12. Pseudo-elements, Pseudo-classes, Responsive Behavior

Hover, selection styling, generated content, and layout changes through media queries.

Pseudo-elements & Hover

Animated underline link

Select this sentence to see custom ::selection styling. This also demonstrates text selection in the browser.

Generated quotation marks using ::before and ::after.

Generated quotation marks using ::before and ::after.

Absolute pseudo
Inline pseudo example
Background decoration
No background content
Notification badge

Responsive Strip

Resize the viewport to see the strip collapse from four columns down to one on small screens.

1
2
3
4