css
What is a .css file?
text/css
CSS (.css) is a plain-text stylesheet describing how HTML elements are presented: colors, layout, typography, and responsive behaviour. It uses selectors paired with declaration blocks, and modern CSS adds custom properties (variables), flexbox and grid layout, and media queries.
How to use a .css file
Use an example .css file to test syntax highlighters, CSS parsers and minifiers, linters (stylelint), and pipelines that process or bundle stylesheets.
Download example .css files
- CSS: Hello WorldA minimal stylesheet that centres a heading with grid: the simplest useful CSS file for testing highlighters, CSS parsers, and minifiers.
- CSS: Component styles (variables, flexbox, keyframes)A realistic component stylesheet using custom properties, flexbox, a fluid clamp() font size, color-mix(), a keyframe animation, and a media query, for testing CSS parsers, linters (stylelint), and highlighters.
- PWA: app-shell.css SAMPLEPWA shell fixture SAMPLE (app-shell.css) for offline app-shell testing.
- Minified CSS with an external source mapA minified stylesheet closing with the CSS form of the annotation, `/*# sourceMappingURL= */` - the comment syntax differs from JavaScript's and is a common reason a CSS map is silently ignored. For testing stylesheet source-map resolution.