@intergrav/dev.css 3.1.2 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -43
- package/addon/header-sticky.css +9 -9
- package/demo.html +294 -294
- package/dev.css +51 -35
- package/package.json +32 -30
- package/theme/boilerplate-auto.css +54 -51
- package/theme/boilerplate.css +23 -22
- package/theme/catppuccin-frappe.css +50 -47
- package/theme/catppuccin-macchiato.css +50 -47
- package/theme/catppuccin-mocha.css +50 -47
- package/theme/day.css +18 -17
- package/theme/night.css +18 -17
- package/theme/terminal.css +24 -23
package/README.md
CHANGED
|
@@ -2,73 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@intergrav/dev.css) [](https://cdn.jsdelivr.net/npm/@intergrav/dev.css/) [](https://github.com/intergrav/dev.css)
|
|
4
4
|
|
|
5
|
-
Tiny, simple, classless CSS framework
|
|
6
|
-
|
|
7
|
-
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.
|
|
5
|
+
Tiny, simple, classless CSS framework inspired by Vercel's [Geist](https://vercel.com/geist) design system. It is designed to make any plain HTML file look clean and modern. The minified stylesheet weighs only **~4.8kb** and includes both light and dark themes.
|
|
8
6
|
|
|
9
7
|
<details>
|
|
10
|
-
<summary>
|
|
11
|
-
|
|
8
|
+
<summary>Click to view preview</summary>
|
|
12
9
|
<img src="https://raw.githubusercontent.com/intergrav/branding/main/dev.css/preview/desktop-light.png" alt="dev.css desktop demo, light mode">
|
|
13
10
|
<img src="https://raw.githubusercontent.com/intergrav/branding/main/dev.css/preview/desktop-dark.png" alt="dev.css desktop demo, dark mode">
|
|
14
11
|
<img height="748px" src="https://raw.githubusercontent.com/intergrav/branding/main/dev.css/preview/mobile-light.png" alt="dev.css mobile demo, dark mode">
|
|
15
12
|
<img height="748px" src="https://raw.githubusercontent.com/intergrav/branding/main/dev.css/preview/mobile-dark.png" alt="dev.css mobile demo, dark mode">
|
|
16
|
-
|
|
17
13
|
</details>
|
|
18
14
|
|
|
19
15
|
## Importing
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
To use dev.css in your HTML, simply add the following line to the `<head>` section of your HTML file:
|
|
22
18
|
|
|
23
19
|
```html
|
|
24
20
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/dev.css@3">
|
|
25
21
|
```
|
|
26
22
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
### Geist Font
|
|
30
|
-
|
|
31
|
-
```html
|
|
32
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/fonts@1/serve/geist.min.css">
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Recommended monospace variant:
|
|
36
|
-
|
|
37
|
-
```html
|
|
38
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/fonts@1/serve/geist-mono.min.css">
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Inter Font
|
|
42
|
-
|
|
43
|
-
```html
|
|
44
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/fonts@1/serve/inter.min.css">
|
|
45
|
-
```
|
|
23
|
+
You can also add a font from [intergrav/fonts](https://github.com/intergrav/fonts#readme) to improve the experience, however it will increase the website download size. Geist and Inter fonts work with dev.css out of the box, other fonts will require a theme to be used. If these fonts are not available, the default system/browser sans-serif and monospace fonts will be used, such as Microsoft's Segoe UI or Apple's San Francisco.
|
|
46
24
|
|
|
47
25
|
## Elements
|
|
48
26
|
|
|
49
|
-
dev.css takes advantage of semantic HTML elements. Here are some guidelines on how
|
|
27
|
+
dev.css takes advantage of semantic HTML elements. Here are some guidelines on how to use them for the best results.
|
|
50
28
|
|
|
51
29
|
### Header
|
|
52
30
|
|
|
53
|
-
Use the `<header>` tag to create a large header for your page.
|
|
54
|
-
|
|
55
|
-
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.
|
|
56
|
-
|
|
57
|
-
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.
|
|
58
|
-
|
|
59
|
-
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.
|
|
31
|
+
Use the `<header>` tag to create a large header for your page. Place it at the very top of your `<body>`. For the title, use an `<h1>` tag. You can also add an optional `<h4>` tag before the `<h1>` tag to provide extra information. If you need a navigation bar, add a `<nav>` element with a `<ul>` that contains `<li>` items with `<a>` links. dev.css will automatically lay out the navigation items horizontally, with dividing bullet points between them. If you are using the `header-sidebar.css` addon, the navigation items will be laid out vertically when in sidebar mode. Optionally, you can add a `<p>` tag after the `<h1>` tag to provide a description of the current page.
|
|
60
32
|
|
|
61
33
|
### Footer
|
|
62
34
|
|
|
63
|
-
Optionally, use the `<footer>` tag to create a footer for your page.
|
|
35
|
+
Optionally, use the `<footer>` tag to create a footer for your page. Place it at the bottom of your `<body>`. You can add any content you like inside the footer.
|
|
64
36
|
|
|
65
37
|
### Text
|
|
66
38
|
|
|
67
|
-
Wrap all body text in `<p>` tags, unless it's the sole child of another element.
|
|
39
|
+
Wrap all body text in `<p>` tags, unless it's the sole child of another element. Use the `<blockquote>` tag for quotes. To highlight text, wrap it in the `<mark>` tag. For code, use `<code>` for short inline code snippets and `<pre>` for code blocks. Use `<kbd>` for keyboard input.
|
|
68
40
|
|
|
69
41
|
### Button
|
|
70
42
|
|
|
71
|
-
|
|
43
|
+
To create a link button, wrap the button in an `<a>` tag. Here's an example:
|
|
72
44
|
|
|
73
45
|
```html
|
|
74
46
|
<a href="https://example.com">
|
|
@@ -78,7 +50,7 @@ For a link button, you can wrap the button in an `<a>` tag. Here's a code exampl
|
|
|
78
50
|
|
|
79
51
|
### Details
|
|
80
52
|
|
|
81
|
-
The `<details>` element can
|
|
53
|
+
The `<details>` element can be used to create a toggle-able dropdown without using any JavaScript. Here's an example:
|
|
82
54
|
|
|
83
55
|
```html
|
|
84
56
|
<details>
|
|
@@ -93,11 +65,11 @@ To learn about other HTML elements and how to write HTML, visit [W3Schools/html]
|
|
|
93
65
|
|
|
94
66
|
## Addons
|
|
95
67
|
|
|
96
|
-
dev.css
|
|
68
|
+
dev.css provides a basic set of styles. Addons are small CSS snippets that can be used to adjust or add functionality to dev.css based on your needs. If you are adding an addon, make sure to include it **after** the main dev.css file. Here are a few built-in addons.
|
|
97
69
|
|
|
98
70
|
### `header-sticky.css`
|
|
99
71
|
|
|
100
|
-
This makes the header sticky
|
|
72
|
+
This addon makes the header sticky, always staying at the top of the screen. Note that this addon is recommended for small headers, as it may affect the usability of your site if the header is large and takes up a lot of space. To use this addon, add the following line after the `dev.css` import:
|
|
101
73
|
|
|
102
74
|
```html
|
|
103
75
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/dev.css@3/addon/header-sticky.min.css">
|
|
@@ -105,7 +77,7 @@ This makes the header sticky - always at the top of the screen. Keep in mind tha
|
|
|
105
77
|
|
|
106
78
|
### `header-sidebar.css`
|
|
107
79
|
|
|
108
|
-
This turns the header into a sidebar on
|
|
80
|
+
This addon turns the header into a sidebar on wide displays. The navigation items are listed vertically in this mode. The sidebar will responsively switch back to the default state if the viewport is too narrow to contain everything. If you are using this addon with `header-sticky.css`, make sure to include it **after** the `header-sticky.css` import. To use this addon, add the following line after the `dev.css` import:
|
|
109
81
|
|
|
110
82
|
```html
|
|
111
83
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/dev.css@3/addon/header-sidebar.min.css">
|
|
@@ -113,10 +85,14 @@ This turns the header into a sidebar on displays that are wide enough to support
|
|
|
113
85
|
|
|
114
86
|
## Themes
|
|
115
87
|
|
|
116
|
-
|
|
88
|
+
dev.css supports custom colors and fonts through themes. You can find some pre-made themes in the `/theme` folder. To use a theme, simply apply it after the dev.css stylesheet. There are themes inspired by terminals, night and day themes, and a set of Catppuccin themes. For example, to apply the terminal theme, add the following line after the `dev.css` import:
|
|
117
89
|
|
|
118
90
|
```html
|
|
119
91
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intergrav/dev.css@3/theme/terminal.min.css">
|
|
120
92
|
```
|
|
121
93
|
|
|
122
|
-
If you
|
|
94
|
+
If you are creating a custom theme, it is recommended to use the `boilerplate-auto.css` template for better accessibility.
|
|
95
|
+
|
|
96
|
+
## Credits
|
|
97
|
+
|
|
98
|
+
- [xz/new.css](https://github.com/xz/new.css) is the main inspiration for this project
|
package/addon/header-sticky.css
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* addon for dev.css v3, a classless CSS framework - https://github.com/intergrav/dev.css */
|
|
2
|
-
/* about: makes the header sticky, always at the top of the screen */
|
|
3
|
-
/* warn: if using with the header-sidebar addon, be sure to include this before it */
|
|
4
|
-
/* warn: i do not recommend using this if your header is large. may affect usability */
|
|
5
|
-
|
|
6
|
-
header {
|
|
7
|
-
position: sticky;
|
|
8
|
-
top: 0;
|
|
9
|
-
}
|
|
1
|
+
/* addon for dev.css v3, a classless CSS framework - https://github.com/intergrav/dev.css */
|
|
2
|
+
/* about: makes the header sticky, always at the top of the screen */
|
|
3
|
+
/* warn: if using with the header-sidebar addon, be sure to include this before it */
|
|
4
|
+
/* warn: i do not recommend using this if your header is large. may affect usability */
|
|
5
|
+
|
|
6
|
+
header {
|
|
7
|
+
position: sticky;
|
|
8
|
+
top: 0;
|
|
9
|
+
}
|