You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-7Lines changed: 37 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,34 @@ A CSS library that provides utility CSS classes which complement [PureCSS](https
4
4
5
5
## Installation
6
6
7
-
TODO
7
+
TODO (first publish on NPM and jsdelivr)
8
+
8
9
9
10
## Utilities
10
11
11
12
### Text colors
12
13
13
-
TODO
14
+
You can change the colors of texts using classes `.pure-txt-black` / `.pure-txt-blue` / `.pure-txt-cyan` / `.pure-txt-green` / `.pure-txt-magenta` / `.pure-txt-red` / `.pure-txt-white` / `.pure-txt-yellow`.
14
15
15
-
### Backgrounds
16
+
Additionally, you can modify the opacity of the colors the `pure-txt-alpha-*` class, where `*` can be replaced with numbers 10, 20, 25, 30, 40, 50, 60, 70, 75, 80 or 90.
16
17
17
-
TODO
18
+
### Background colors
19
+
20
+
You can change the colors of backgrounds using classes `.pure-bg-black` / `.pure-bg-blue` / `.pure-bg-cyan` / `.pure-bg-green` / `.pure-bg-magenta` / `.pure-bg-red` / `.pure-bg-white` / `.pure-bg-yellow`.
21
+
22
+
Additionally, you can modify the opacity of the colors the `pure-bg-alpha-*` class, where `*` can be replaced with numbers 10, 20, 25, 30, 40, 50, 60, 70, 75, 80 or 90.
23
+
24
+
### Borders
25
+
26
+
You can define borders using the class `.pure-bd-*`, where `*` can be any number between 1 and 5, defining the width (in pixels) of the border. By default the border will be solid and black.
27
+
28
+
To change the style of a border you can use classes `.pure-bd-solid` / `.pure-bd-dotted` / `.pure-bd-dashed`.
29
+
30
+
To change the color of a border you can use classes `.pure-bd-black` / `.pure-bd-blue` / `.pure-bd-cyan` / `.pure-bd-green` / `.pure-bd-magenta` / `.pure-bd-red` / `.pure-bd-white` / `.pure-bd-yellow`.
31
+
32
+
Additionally, you can modify the opacity of the border colors using the `pure-bg-alpha-*` class, where `*` can be replaced with numbers 10, 20, 25, 30, 40, 50, 60, 70, 75, 80 or 90.
33
+
34
+
To set the radius of the border you can use classes `.pure-bd-radius-*` (where `*` can be any number between 1 and 5) / `.pure-bd-radius-circle` / `.pure-bd-radius-pill`.
18
35
19
36
### Buttons
20
37
@@ -24,21 +41,33 @@ TODO
24
41
25
42
TODO
26
43
44
+
### Opacity
45
+
46
+
The opacity of elements can be modified using the `.pure-opacity-*` class, where `*` can be replaced with numbers 10, 20, 25, 30, 40, 50, 60, 70, 75, 80 or 90.
47
+
27
48
### Spacing
28
49
29
50
The library provides `pure-m-*` and `pure-p-*` classes for controlling an element's margin or padding, where `*` can be replaced with any number between `1` and `8`.
30
51
31
52
To set the margin or padding to a single side, you can use classes `pure-mb-*` / `pure-ml-*` / `pure-mr-*` / `pure-mt-*` and `pure-pb-*` / `pure-pl-*` / `pure-pr-*` / `pure-pt-*`; and to set the margin or padding to the horizontal or vertical sides, you can use classes `pure-mx-*` / `pure-my-*` and `pure-px-*` / `pure-py-*`.
32
53
33
-
The base spacing used is `0.25rem`, but you can change this value either by overriding the value of the `--pureSpacingUnit` variable or by using the `pure-space-2x` / `pure-space-3x` / `pure-space-4x` / `pure-space-5x` classes.
34
-
35
54
### Sizing
36
55
37
56
TODO
38
57
58
+
39
59
## Customization
40
60
41
-
TODO (Variables)
61
+
### Colors
62
+
63
+
The library uses variables `--pureBlack` / `--pureBlue` / `--pureCyan` / `--pureGreen` / `--pureMagenta` / `--pureRed` / `--pureWhite` / `--pureYellow` to define colors that later are used to define utility classes for texts, background, borders and buttons.
64
+
65
+
You can override these variables to change the colors used, but on that case you must also override the corresponding RBG variables: `--pureBlackRgb` / `--pureBlueRgb` / `--pureCyanRgb` / `--pureGreenRgb` / `--pureMagentaRgb` / `--pureRedRgb` / `--pureWhiteRgb` / `--pureYellowRgb`.
66
+
67
+
### Spacing
68
+
69
+
The base spacing used is `0.25rem`, but you can change this value by overriding the value of the `--pureSpacingUnit` variable.
70
+
42
71
43
72
## Development
44
73
@@ -47,6 +76,7 @@ The library was implemented using [Sass](https://sass-lang.com/), you can use th
47
76
*`npm run build`
48
77
*`npm run dev`
49
78
79
+
50
80
## License
51
81
52
82
PureCSS Utilities is free software; you can redistribute it and/or modify it under the terms of the Mozilla Public License v2.0. You should have received a copy of the MPL 2.0 along with this software, otherwise you can obtain one at http://mozilla.org/MPL/2.0/.
0 commit comments