lightweight, simple, classless CSS framework inspired by new.css
devcss.devins.page
framework
lightweight
css
classless
stylesheet
1# intergrav/dev.css
2
3[](https://www.npmjs.com/package/@intergrav/dev.css) [](https://cdn.jsdelivr.net/npm/@intergrav/dev.css/) [](https://github.com/intergrav/dev.css)
4
5Extremely simple, small, classless CSS framework in the style of Vercel's Geist. Inspired by [xz/new.css](https://github.com/xz/new.css).
6
7The 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.
8
9## Importing
10
11In your HTML's `<head>` all you have to write is this, and you're done! (`.min` means to minify the file)
12
13```html
14<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/dev.css@2">
15```
16
17I also recommend adding a font through [intergrav/fonts](https://github.com/intergrav/fonts). Geist or Inter work with dev.css out of the box. It will use the default system/browser san-serif fonts otherwise.
18
19### Geist Font
20
21```html
22<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/fonts@1/serve/geist.min.css">
23```
24```html
25<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/fonts@1/serve/geist-mono.min.css">
26```
27
28### Inter Font
29
30```html
31<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/fonts@1/serve/inter.min.css">
32```
33
34## Elements
35
36dev.css takes advantage of semantic HTML elements. Here are some guidelines on how these should be used for the best results.
37
38### Header
39
40Use 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.
41
42For 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.
43
44If you need a navigation bar, you can add a `<nav>` with `<a>` links inside it. dev.css will automatically add dividing bullet points between or before the `<a>` tags, depending on whether the user is in topbar or sidebar mode. In sidebar mode, the navigation bar will lay out into separate lines.
45
46Optionally, 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.
47
48### Footer
49
50Optionally, use the `<footer>` tag to create a large 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.
51
52### Text
53
54Wrap 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.
55
56### Button
57
58For a link button, you can wrap the button in an `<a>` tag. Here's a code example:
59
60```html
61<a href="https://example.com">
62 <button>Click me!</button>
63</a>
64```
65
66### Details
67
68The `<details>` element can make a toggle-able dropdown without using any JavaScript. Here's a code example:
69
70```html
71<details>
72 <summary>Click me!</summary>
73 <p>Lorem ipsum dolor sit amet.</p>
74</details>
75```
76
77### More
78
79To learn about other HTML elements and how to write HTML, visit [W3Schools/html](https://www.w3schools.com/html/).
80
81## Themes
82
83You can use custom colors and custom fonts in dev.css through themes. See the `/theme` folder to view some premade ones. You can also copy the `boilerplate.css` and make a theme yourself. Simply apply it after the dev.css stylesheet. For example, to apply the terminal theme, put this after your main stylesheet:
84
85```html
86<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/dev.css@2/theme/terminal.min.css">
87```