Skip to content

Commit ff8f5dd

Browse files
committed
feat: add additional utilities, refactor and update docs ref
1 parent 2e7c894 commit ff8f5dd

38 files changed

+1164
-359
lines changed

.prettierignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Build output
2+
dist/
3+
node_modules/
4+
5+
# VitePress cache and build output
6+
docs/.vitepress/dist/
7+
docs/.vitepress/cache/
8+
9+
# Lockfile
10+
pnpm-lock.yaml

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 80
7+
}

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,27 @@ A lightweight CSS utility library to ease development.
1212

1313
</div>
1414

15-
1615
## Documentation
17-
You can view the documentation at [minimal-css-utility](https://bluepie.in/minimal-css-utility/). The full documentation for the utility classes can also be found in the `docs/` directory of this repository.
1816

17+
You can view the documentation at [minimal-css-utility](https://bluepie.in/minimal-css-utility/). The full documentation for the utility classes can also be found in the `docs/` directory of this repository.
1918

20-
## Motivation
19+
## Motivation
2120

2221
I wanted a minimal CSS utility that provides just basic features to get started quickly without the bloat of larger frameworks.
2322

24-
2523
For my projects, I use reset.css and a set of utility classes without external libraries, I move them from project to project. This eliminates it and makes it easier to maintain and view the docs.
2624

2725
## Features
2826

2927
- Reset CSS
3028
- Grid Layout
3129
- Utility classes for:
30+
- Borders & Shadows
3231
- Display
3332
- Flexbox
33+
- Interactivity (cursor, opacity)
34+
- Overflow
35+
- Positioning
3436
- Sizing
3537
- Spacing
3638
- Typography
@@ -57,7 +59,10 @@ pnpm add minimal-css-utility
5759
You can also use the compiled CSS file from a CDN:
5860

5961
```html
60-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/minimal-css-utility/dist/min.css">
62+
<link
63+
rel="stylesheet"
64+
href="https://cdn.jsdelivr.net/npm/minimal-css-utility/dist/min.css"
65+
/>
6166
```
6267

6368
Link: https://cdn.jsdelivr.net/npm/minimal-css-utility/dist/min.css
@@ -71,15 +76,15 @@ You can either import the compiled CSS file into your project or import the SCSS
7176
Import the `min.css` file in your main CSS file:
7277

7378
```css
74-
@import "minimal-css-utility/dist/min.css";
79+
@import 'minimal-css-utility/dist/min.css';
7580
```
7681

7782
### SCSS
7883

7984
Import the `style.scss` file in your main SCSS file:
8085

8186
```scss
82-
@import "minimal-css-utility/scss/style.scss";
87+
@import 'minimal-css-utility/scss/style.scss';
8388
```
8489

8590
## Building from source
@@ -109,4 +114,3 @@ This will generate the `dist/min.css` file.
109114
## License
110115

111116
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
112-

docs/.vitepress/config.js

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,47 @@
11
export default {
22
title: 'Minimal CSS',
33
description: 'A SCSS theme documentation site.',
4-
base: "/minimal-css-utility/",
4+
base: '/minimal-css-utility/',
55
themeConfig: {
66
nav: [
77
{ text: 'Home', link: '/' },
88
{ text: 'Guide', link: '/getting-started/introduction' },
9-
{ text: 'Github', link: 'https://github.com/aghontpi/minimal-css-utility/' }
9+
{
10+
text: 'Github',
11+
link: 'https://github.com/aghontpi/minimal-css-utility/',
12+
},
1013
],
1114
sidebar: [
1215
{
1316
text: 'Getting Started',
1417
items: [
1518
{ text: 'Introduction', link: '/getting-started/introduction' },
1619
{ text: 'Breakpoints', link: '/getting-started/breakpoints' },
17-
{ text: 'CSS Reset', link: '/getting-started/reset' }
18-
]
20+
{ text: 'CSS Reset', link: '/getting-started/reset' },
21+
],
1922
},
2023
{
2124
text: 'Layout',
22-
items: [
23-
{ text: 'Grid', link: '/layout/grid' },
24-
]
25+
items: [{ text: 'Grid', link: '/layout/grid' }],
2526
},
2627
{
2728
text: 'Utilities',
2829
items: [
29-
{ text: 'Spacing', link: '/utilities/spacing' },
30+
{ text: 'Borders', link: '/utilities/borders' },
3031
{ text: 'Display', link: '/utilities/display' },
3132
{ text: 'Flexbox', link: '/utilities/flexbox' },
33+
{ text: 'Interactivity', link: '/utilities/interactivity' },
34+
{ text: 'Overflow', link: '/utilities/overflow' },
35+
{ text: 'Positioning', link: '/utilities/positioning' },
36+
{ text: 'Shadows', link: '/utilities/shadows' },
3237
{ text: 'Sizing', link: '/utilities/sizing' },
38+
{ text: 'Spacing', link: '/utilities/spacing' },
3339
{ text: 'Typography', link: '/utilities/typography' },
34-
]
35-
}
40+
],
41+
},
3642
],
3743
search: {
38-
provider: 'local'
39-
}
40-
}
41-
}
44+
provider: 'local',
45+
},
46+
},
47+
};

docs/.vitepress/theme/custom.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
--vp-font-family-mono: 'Inter', sans-serif !important;
66
}
77

8-
html, body {
9-
font-family: 'Inter', sans-serif !important;
8+
html,
9+
body {
10+
font-family: 'Inter', sans-serif !important;
1011
}
1112

12-
ul li, ol li {
13+
ul li,
14+
ol li {
1315
line-height: 1.5;
1416
}

docs/.vitepress/theme/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import DefaultTheme from 'vitepress/theme'
2-
import '../../../dist/min.css'
3-
import './custom.css'
1+
import DefaultTheme from 'vitepress/theme';
2+
import '../../../dist/min.css';
3+
import './custom.css';
44

55
export default {
66
...DefaultTheme,
7-
}
7+
};

docs/getting-started/breakpoints.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ This theme's utility classes are applied from the specified breakpoint and up, m
1010

1111
Here are the breakpoints I use throughout my system:
1212

13-
- **`xs`** (extra-small): 0px (default, no media query needed)
14-
- **`sm`** (small): 576px
15-
- **`md`** (medium): 768px
16-
- **`lg`** (large): 992px
17-
- **`xl`** (extra-large): 1200px
13+
- **`xs`** (extra-small): 0px (default, no media query needed)
14+
- **`sm`** (small): 576px
15+
- **`md`** (medium): 768px
16+
- **`lg`** (large): 992px
17+
- **`xl`** (extra-large): 1200px
18+
- **`xxl`** (extra-extra-large): 1440px
1819

1920
## Example Usage
2021

2122
You can use these breakpoints as suffixes to utility classes to create responsive designs.
2223

23-
<div class="d-block d-md-flex d-lg-none" style="background-color: #f8f9fa; padding: 1rem; border: 1px solid #dee2e6;">
24+
<div class="d-block d-md-flex d-lg-none d-xxl-block" style="background-color: #f8f9fa; padding: 1rem; border: 1px solid #dee2e6;">
2425
<div style="background-color: #e9ecef; padding: 1rem; margin: 0.5rem;">Item 1</div>
2526
<div style="background-color: #e9ecef; padding: 1rem; margin: 0.5rem;">Item 2</div>
2627
</div>
@@ -29,7 +30,8 @@ You can use these breakpoints as suffixes to utility classes to create responsiv
2930
<ul>
3031
<li><strong>On extra-small and small screens (<code>&lt;768px</code>):</strong> The container is a block element, and the items are stacked vertically.</li>
3132
<li><strong>On medium screens (<code>&ge;768px</code> and <code>&lt;992px</code>):</strong> The container becomes a flex container, and the items are displayed side-by-side.</li>
32-
<li><strong>On large and extra-large screens (<code>&ge;992px</code>):</strong> The entire container is hidden.</li>
33+
<li><strong>On large and extra-large screens (<code>&ge;992px</code> and <code>&lt;1440px</code>):</strong> The entire container is hidden.</li>
34+
<li><strong>On extra-extra-large screens (<code>&ge;1440px</code>):</strong> The container will reappear as a block element.</li>
3335
</ul>
3436

3537
```html

docs/getting-started/introduction.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,33 @@ For my projects, I use reset.css and a set of utility classes without external l
1111
## Installation
1212

1313
::: code-group
14+
1415
```bash [npm]
1516
npm install minimal-css-utility
1617
```
18+
1719
```bash [yarn]
1820
yarn add minimal-css-utility
1921
```
22+
2023
```bash [pnpm]
2124
pnpm add minimal-css-utility
2225
```
26+
2327
:::
2428

2529
To use this utility in your project, you can either link to the compiled CSS file from the `dist` directory or import the SCSS files into your own stylesheet.
2630

2731
### Linking with CDN
2832

2933
```html
30-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/minimal-css-utility/dist/min.css">
34+
<link
35+
rel="stylesheet"
36+
href="https://cdn.jsdelivr.net/npm/minimal-css-utility/dist/min.css"
37+
/>
3138
```
3239

33-
### Importing in your CSS or SCSS
40+
### Importing in your CSS or SCSS
3441

3542
```css
3643
@import 'minimal-css-utility/dist/min.css';

0 commit comments

Comments
 (0)