Code · 1 file
Sample CSS File
CSS styles web pages. This sample uses custom properties, clamp(), color-mix() and container queries. The CSS sample is a small program — a customer record, a VIP check and a formatted total — that is the same in every language we offer, so you can compare them side by side.
CSS · 645 B
Sample CSS file
An idiomatic CSS example: a customer record type, a VIP check, a total and a formatted loop — the same program in every language we offer.
CC0 · free for any use · Verified by an independent tool · Report a problem
/* Sample stylesheet — samplefiles.com */
:root {
--bg: #faf9f5;
--text: #141413;
--accent: #b0532e;
--radius: 12px;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #141413;
--text: #f0eee6;
}
}
body {
margin: 0;
font: 16px/1.6 system-ui, sans-serif;
background: var(--bg);
color: var(--text);
}
.card {
display: grid;
gap: 0.5rem;File details
Download from the command line
curl -L -o sample.css https://files.samplefiles.com/code/css/sample.csswget https://files.samplefiles.com/code/css/sample.csshttps://files.samplefiles.com/code/css/sample.cssprintf '%s %s\n' 975985ae16dc864b22ee8db0b78d4b77208fcc849034093707280ec86be8bf49 sample.css | shasum -a 256 -cOr check the download in your browser with the checksum calculator.