lightweight, simple, classless CSS framework inspired by new.css devcss.devins.page
framework lightweight css classless stylesheet
17
fork

Configure Feed

Select the types of activity you want to include in your feed.

1# intergrav/dev.css 2 3[![NPM Version](https://img.shields.io/npm/v/@intergrav/dev.css)](https://www.npmjs.com/package/@intergrav/dev.css) [![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/@intergrav/dev.css)](https://cdn.jsdelivr.net/npm/@intergrav/dev.css/) [![GitHub Repo stars](https://img.shields.io/github/stars/intergrav/dev.css)](https://github.com/intergrav/dev.css) 4 5Tiny, simple, classless CSS framework in the style of Vercel's [Geist](https://vercel.com/geist) design system. 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@3"> 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 if those are not available. 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 25Recommended, monospace variant: 26 27```html 28<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/fonts@1/serve/geist-mono.min.css"> 29``` 30 31### Inter Font 32 33```html 34<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/fonts@1/serve/inter.min.css"> 35``` 36 37## Elements 38 39dev.css takes advantage of semantic HTML elements. Here are some guidelines on how these should be used for the best results. 40 41### Header 42 43Use 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. 44 45For 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. 46 47If 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. 48 49Optionally, 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. 50 51### Footer 52 53Optionally, 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. 54 55### Text 56 57Wrap 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. 58 59### Button 60 61For a link button, you can wrap the button in an `<a>` tag. Here's a code example: 62 63```html 64<a href="https://example.com"> 65 <button>Click me!</button> 66</a> 67``` 68 69### Details 70 71The `<details>` element can make a toggle-able dropdown without using any JavaScript. Here's a code example: 72 73```html 74<details> 75 <summary>Click me!</summary> 76 <p>Lorem ipsum dolor sit amet.</p> 77</details> 78``` 79 80### More 81 82To learn about other HTML elements and how to write HTML, visit [W3Schools/html](https://www.w3schools.com/html/). 83 84## Themes 85 86You 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: 87 88```html 89<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/dev.css@3/theme/terminal.min.css"> 90```