p {
margin: 0;
}
h1 {
font-size: 2rem;
}
@media (width < 600px) {
body {
background: lightgray;
}
}`<rule-list>` CSS type / notebook
`<rule-list>` CSS type
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
@media (prefers-color-scheme: dark) {
main {
background: black;
color: white;
}
a {
color: skyblue;
}
}