<!doctype html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="/assets/reset.css" rel="stylesheet"> <link href="setup.css" rel="stylesheet"> <link href="style.css" rel="stylesheet"> </head> <body> <section> <p>This element is responsive.</p> <p>I’ll add some text more here so we have something to look at and so that it wraps, but the text itself isn’t important, at the moment.</p> <p>Some more text in it. Again the text doesn’t really matter, I just want a bit of stuff in here. A few lines, is all.</p> <p>If you’re still reading this, I appreciate it.</p> </section> </body> </html>
body { font-family: sans-serif; padding: 20px; } section { padding: 10px; } p:not(:first-child) { margin-top: 10px; }
:root { --accent: aquamarine; --background: white; --foreground: black; } @media (prefers-color-scheme: dark) { :root { --accent: teal; --background: black; --foreground: white; } } body { background-color: var(--background); color: var(--foreground); } section { background-color: var(--accent); }