Tiny, simple, classless CSS framework in the style of Vercel's Geist design system. Inspired by xz/new.css.
The minified stylesheet weighs only ~4.8kb and can make any plain HTML file look clean and modern. It also has a light and dark theme.
In your HTML's <head>
all you have to write is this, and you're done! (.min
means to minify the file)
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/dev.css@3">
I also recommend adding a font through intergrav/fonts. Geist or Inter work with dev.css out of the box. It will use the default system/browser san-serif fonts if those are not available.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/fonts@1/serve/geist.min.css">
Recommended monospace variant:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/fonts@1/serve/geist-mono.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/fonts@1/serve/inter.min.css">
dev.css takes advantage of semantic HTML elements. Here are some guidelines on how these should be used for the best results.
Use the <header>
tag to create a large header for your page. Only use this at the very top of your <body>
, or else it may look wonky.
For the title, the header should contain an <h1>
tag. You can also add an <h4>
tag before the <h1>
tag if you want to show extra information.
If you need a navigation bar, you can add a <nav>
with a <ul>
that has <li>
items with <a>
links inside them. See the demo.html
for an example. dev.css will automatically lay these out horizontally, with dividing bullet points between them. If you are using the header-sidebar.css
addon, these items will lay out vertically when in sidebar mode.
Optionally, you could add a <p>
tag after the <h1>
tag if you want to give a description of the page the user is currently on.
Optionally, use the <footer>
tag to create a footer for your page. Only use this at the bottom of your <body>
, or else it may look wonky. You can add whatever content in here that you'd like.
Wrap all body text in <p>
tags, unless it's the sole child of another element. If you want to write quotes, you can use the <blockquote>
tag. To highlight text, wrap it in the <mark>
tag. Want to show code? Use <code>
for short inline code. Use <pre>
for code blocks. Use <kbd>
for keyboard input.
For a link button, you can wrap the button in an <a>
tag. Here's a code example:
<a href="https://example.com">
<button>Click me!</button>
</a>
The <details>
element can make a toggle-able dropdown without using any JavaScript. Here's a code example:
<details>
<summary>Click me!</summary>
<p>Lorem ipsum dolor sit amet.</p>
</details>
To learn about other HTML elements and how to write HTML, visit W3Schools/html.
dev.css at the minimum is very basic. Addons are small CSS snippets that adjust or add on to the functionality of dev.css, based on what you want for your users. Examples include turning the header into a sidebar, or making the header sticky. If you are adding an addon, it must be added after the main dev.css file. You might also need order them in a specific way to make it work. Here are a few built-in addons.
This makes the header sticky - always at the top of the screen. Keep in mind that I do not recommend using this if your header is large, as it could affect usability of your site since it'll always be onscreen and will take up a lot of space. Only use it if your header is small, e.g. only contains a one-line <h1>
and <nav>
.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/dev.css@3/addon/header-sticky.min.css">
This turns the header into a sidebar on displays that are wide enough to support it. It will list the navigation out vertically in this mode. It will responsively turn back into the default state if the viewport is too thin to contain everything. If you are using this with header-sticky.css
, be sure to add it after that rather than before. To import it, add this line after dev.css
:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/dev.css@3/addon/header-sidebar.min.css">
You can use custom colors and custom fonts in dev.css through themes. See the /theme
folder to view some premade ones. To use a theme, simply apply it after the dev.css stylesheet. I provide a terminal-like theme, night and day themes, and a set of Catppuccin themes. For example, to apply the terminal theme, place this after your main stylesheet:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/dev.css@3/theme/terminal.min.css">
If you're making a theme, I highly recommend using the boilerplate-auto.css
template rather than the boilerplate.css
template for accessibility reasons.