Skip to content

Commit 371887d

Browse files
committed
Update readme file
1 parent d8a4e9c commit 371887d

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

README.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,29 @@ A CSS library that provides utility CSS classes which complement [PureCSS](https
44

55
[See Demo](https://jfmdev.github.io/purecss-utilities/demo.html)
66

7-
> Note: the library doesn't provide utilities for Flexbox containers, for that you can use the [Flexbox utility classes](https://gist.github.com/jfmdev/e3541b3d9e94866fe429b9baf89e6303) Gist.
7+
## Installation
88

9+
You can add this library to your page using the CDN from jsDelivr, just add a `<link>` element into your page's `<head>`, before your project's stylesheets but after PureCSS stylesheets. E.g.:
910

10-
## Installation
11+
```html
12+
<head>
13+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/pure-min.css">
14+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/purecss-utilities@main/dist/all.css">
15+
</head>
16+
```
17+
18+
You can also install the package using NPM:
19+
20+
```
21+
npm install purecss purecss-utilities --save
22+
```
1123

12-
TODO (first publish on NPM)
24+
And then reference the `css` files (from the `dist/` folder) or the `scss` files (from the `src/` folder), like:
1325

14-
> https://cdn.jsdelivr.net/gh/jfmdev/purecss-utilities@main/dist/all.css
15-
>
16-
> https://www.jsdelivr.com/documentation
26+
```js
27+
import 'purecss/build/pure-min.css'
28+
import 'purecss-utilities/dist/all.css'
29+
```
1730

1831
## Utilities
1932

@@ -61,6 +74,9 @@ The library provides `pure-m-*` and `pure-p-*` classes for controlling an elemen
6174

6275
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-*`.
6376

77+
### Flex
78+
79+
The library doesn't provide utilities for Flexbox containers, for that you can use the [Flexbox utility classes](https://gist.github.com/jfmdev/e3541b3d9e94866fe429b9baf89e6303) Gist.
6480

6581
## Customization
6682

@@ -72,20 +88,17 @@ You can override these variables to change the colors used, but on that case you
7288

7389
Additionally, for the case of buttons, you may also need to override the variables `---pureBlackContrastRgb` / `---pureBlueContrastRgb` / `---pureCyanContrastRgb` / `---pureGreenContrastRgb` / `---pureGreyContrastRgb` / `---pureMagentaContrastRgb` / `---pureRedContrastRgb` / `---pureWhiteContrastRgb` / `---pureYellowContrastRgb` that define the color of the labels inside the buttons.
7490

75-
7691
### Spacing
7792

7893
The base spacing used is `0.25rem`, but you can change this value by overriding the value of the `--pureSpacingUnit` variable.
7994

80-
8195
## Development
8296

8397
The library was implemented using [Sass](https://sass-lang.com/), you can use the following commands to build it:
8498

8599
* `npm run build`
86100
* `npm run dev`
87101

88-
89102
## License
90103

91104
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

Comments
 (0)