@pearpages/pulp-css 0.0.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/LICENSE +21 -0
- package/README.md +51 -0
- package/package.json +33 -0
- package/src/base.css +33 -0
- package/src/index.css +5 -0
- package/src/layers.css +8 -0
- package/src/reset.css +65 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pere Pages
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @pearpages/pulp-css
|
|
2
|
+
|
|
3
|
+
The base styles of [pulp](https://pulp.pearpages.com): cascade layers, a reset, and body defaults
|
|
4
|
+
on top of the tokens. Framework-agnostic, no build step. Import it once per app.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npm install @pearpages/pulp-css
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Use
|
|
13
|
+
|
|
14
|
+
```css
|
|
15
|
+
@import "@pearpages/pulp-css";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
That one import sets the layer order, loads
|
|
19
|
+
[`@pearpages/pulp-tokens`](https://www.npmjs.com/package/@pearpages/pulp-tokens), then the reset
|
|
20
|
+
and the base styles. Choose a brand and scheme with `data-brand` and `data-scheme` on `<html>`
|
|
21
|
+
(see the tokens package).
|
|
22
|
+
|
|
23
|
+
## Cascade layers
|
|
24
|
+
|
|
25
|
+
```css
|
|
26
|
+
@layer reset, tokens, vendor, base, components, utilities;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- `vendor` is for third-party stylesheets, so they sit below pulp's components:
|
|
30
|
+
`@import "some-library/styles.css" layer(vendor);`
|
|
31
|
+
- Rules you write outside any layer always win over all of these. That is the intended way
|
|
32
|
+
to override pulp.
|
|
33
|
+
|
|
34
|
+
Apps that assemble their own stack can import the pieces separately:
|
|
35
|
+
`@pearpages/pulp-css/layers.css`, `/reset.css` and `/base.css`.
|
|
36
|
+
|
|
37
|
+
## Fonts
|
|
38
|
+
|
|
39
|
+
The tokens name the brand typefaces with system fallbacks, but no font files are shipped. Load
|
|
40
|
+
them yourself, for example from `@fontsource-variable/*`:
|
|
41
|
+
|
|
42
|
+
- pulp: Archivo, Instrument Sans, Geist Mono
|
|
43
|
+
- bitepals: Nunito, Inter
|
|
44
|
+
|
|
45
|
+
## Browser support
|
|
46
|
+
|
|
47
|
+
Native CSS nesting and `light-dark()`: Chrome/Edge 123, Firefox 120, Safari 17.5 or later.
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pearpages/pulp-css",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "pulp base styles: cascade layers, a reset, and body defaults on top of the tokens. Framework-agnostic; import once per app.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Pere Pages <hello@pearpages.com> (https://pearpages.com)",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/pearpages/pulp.git",
|
|
10
|
+
"directory": "packages/css"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"sideEffects": true,
|
|
14
|
+
"files": [
|
|
15
|
+
"src"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
".": "./src/index.css",
|
|
19
|
+
"./layers.css": "./src/layers.css",
|
|
20
|
+
"./reset.css": "./src/reset.css",
|
|
21
|
+
"./base.css": "./src/base.css",
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@pearpages/pulp-tokens": "^0.0.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"publint": "^0.3.24"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"check:package": "publint"
|
|
32
|
+
}
|
|
33
|
+
}
|
package/src/base.css
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@layer base {
|
|
2
|
+
body {
|
|
3
|
+
background: var(--color-surface-base);
|
|
4
|
+
color: var(--color-text-default);
|
|
5
|
+
font-family: var(--font-family-body);
|
|
6
|
+
font-size: var(--font-size-md);
|
|
7
|
+
line-height: var(--font-line-height-normal);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
h1,
|
|
11
|
+
h2,
|
|
12
|
+
h3,
|
|
13
|
+
h4 {
|
|
14
|
+
font-family: var(--font-family-display);
|
|
15
|
+
line-height: var(--font-line-height-tight);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
code,
|
|
19
|
+
kbd,
|
|
20
|
+
pre,
|
|
21
|
+
samp {
|
|
22
|
+
font-family: var(--font-family-mono);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
a {
|
|
26
|
+
color: var(--color-action-text);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:focus-visible {
|
|
30
|
+
outline: var(--focus-ring-width) solid var(--color-border-focus);
|
|
31
|
+
outline-offset: var(--focus-ring-offset);
|
|
32
|
+
}
|
|
33
|
+
}
|
package/src/index.css
ADDED
package/src/layers.css
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Cascade order for everything pulp ships, declared once and first.
|
|
3
|
+
* `vendor` is for third-party stylesheets (`@import "…" layer(vendor)`), so they sit
|
|
4
|
+
* below pulp's own components. Consumers can add their own layers after `utilities`;
|
|
5
|
+
* an unlayered rule in the app always wins over any of these, which is the intended
|
|
6
|
+
* escape hatch.
|
|
7
|
+
*/
|
|
8
|
+
@layer reset, tokens, vendor, base, components, utilities;
|
package/src/reset.css
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@layer reset {
|
|
2
|
+
*,
|
|
3
|
+
*::before,
|
|
4
|
+
*::after {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
* {
|
|
9
|
+
margin: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
html {
|
|
13
|
+
text-size-adjust: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
body {
|
|
17
|
+
min-block-size: 100vh;
|
|
18
|
+
line-height: 1.5;
|
|
19
|
+
-webkit-font-smoothing: antialiased;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
img,
|
|
23
|
+
picture,
|
|
24
|
+
video,
|
|
25
|
+
canvas,
|
|
26
|
+
svg {
|
|
27
|
+
display: block;
|
|
28
|
+
max-inline-size: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
input,
|
|
32
|
+
button,
|
|
33
|
+
textarea,
|
|
34
|
+
select {
|
|
35
|
+
font: inherit;
|
|
36
|
+
color: inherit;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
button {
|
|
40
|
+
background: none;
|
|
41
|
+
border: none;
|
|
42
|
+
padding: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
p,
|
|
46
|
+
h1,
|
|
47
|
+
h2,
|
|
48
|
+
h3,
|
|
49
|
+
h4,
|
|
50
|
+
h5,
|
|
51
|
+
h6 {
|
|
52
|
+
overflow-wrap: break-word;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@media (prefers-reduced-motion: reduce) {
|
|
56
|
+
*,
|
|
57
|
+
*::before,
|
|
58
|
+
*::after {
|
|
59
|
+
animation-duration: 0.01ms !important;
|
|
60
|
+
animation-iteration-count: 1 !important;
|
|
61
|
+
transition-duration: 0.01ms !important;
|
|
62
|
+
scroll-behavior: auto !important;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|