@editio-ui/react 0.1.0 → 0.1.2
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 +257 -0
- package/dist/editorial/backgrounds.css +0 -2
- package/dist/editorial/buttons.css +0 -14
- package/dist/editorial/choices.css +0 -14
- package/dist/editorial/disclosure.css +0 -6
- package/dist/editorial/feedback.css +0 -6
- package/dist/editorial/fields.css +0 -16
- package/dist/editorial/motion.css +0 -4
- package/dist/editorial/showcase.css +0 -6
- package/dist/editorial/type.css +0 -8
- package/dist/editorial.css +0 -222
- package/dist/index.d.ts +0 -3
- package/dist/index.js +1 -3
- package/package.json +10 -8
- package/dist/components/objects/index.d.ts +0 -18
- package/dist/components/objects/index.js +0 -220
- package/dist/components/studies/index.d.ts +0 -25
- package/dist/components/studies/index.js +0 -140
- package/dist/editorial/objects.css +0 -1
- package/dist/editorial/redesign.css +0 -132
- package/dist/editorial/studies.css +0 -10
package/README.md
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# Editio
|
|
2
|
+
|
|
3
|
+
**An editorial design system for the web.**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@editio-ui/react)
|
|
6
|
+
[](https://www.npmjs.com/package/@editio-ui/react)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
|
+
Editio brings the visual language of print to the web: mastheads, ink, paper, proof marks, halftones, expressive typography and carefully composed layouts.
|
|
10
|
+
|
|
11
|
+
It pairs headless React primitives with an optional plain-CSS editorial design layer. Use the primitives with your own styles, or use the editorial layer with React or native HTML.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install @editio-ui/react
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
pnpm add @editio-ui/react
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
yarn add @editio-ui/react
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
bun add @editio-ui/react
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Requires React and React DOM 18 or later, as declared in the package's peer dependencies, and an ES module-compatible build environment. TypeScript declarations are included. No Tailwind CSS required.
|
|
32
|
+
|
|
33
|
+
## Quick start
|
|
34
|
+
|
|
35
|
+
Import the styles once in your application entry point (for example, `src/main.tsx` in Vite):
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
import "@editio-ui/react/editorial.css";
|
|
39
|
+
import "@editio-ui/react/fonts.css"; // Optional: loads Google Fonts
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Create an editorial interface:
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
import { Button, Checkbox, Input } from "@editio-ui/react";
|
|
46
|
+
|
|
47
|
+
export default function App() {
|
|
48
|
+
return (
|
|
49
|
+
<main data-ed-theme="bone" data-ed-surface="paper">
|
|
50
|
+
<h2 className="ed-headline">
|
|
51
|
+
Behind the <em className="ed-swash">Camera</em>
|
|
52
|
+
</h2>
|
|
53
|
+
|
|
54
|
+
<form onSubmit={(event) => event.preventDefault()}>
|
|
55
|
+
<label className="ed-label" htmlFor="email">Email address</label>
|
|
56
|
+
<Input id="email" type="email" className="ed-input"
|
|
57
|
+
data-variant="underline" placeholder="you@example.com" required />
|
|
58
|
+
<label className="ed-field">
|
|
59
|
+
<Checkbox className="ed-check" data-variant="proof" />
|
|
60
|
+
Receive editorial updates
|
|
61
|
+
</label>
|
|
62
|
+
<Button type="submit" className="ed-btn" data-variant="offset">
|
|
63
|
+
Subscribe
|
|
64
|
+
</Button>
|
|
65
|
+
</form>
|
|
66
|
+
</main>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The form is a visual example; connect your own submission handler for real subscriptions.
|
|
72
|
+
|
|
73
|
+
## Two layers, one library
|
|
74
|
+
|
|
75
|
+
### Headless React primitives
|
|
76
|
+
|
|
77
|
+
The React exports provide native element behavior without imposing visual styles. Use `className`, `style`, native attributes and event handlers to customize them.
|
|
78
|
+
|
|
79
|
+
| Export | Purpose |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| `Button` | Native button; defaults to `type="button"` |
|
|
82
|
+
| `Checkbox` | Native checkbox with controlled, uncontrolled and indeterminate states |
|
|
83
|
+
| `Switch` | Checkbox-based on/off control with `role="switch"` |
|
|
84
|
+
| `RadioGroup.Root` / `RadioGroup.Item` | Grouped native radio inputs |
|
|
85
|
+
| `Input` | Native input |
|
|
86
|
+
| `Textarea` | Native textarea |
|
|
87
|
+
| `Separator` | Semantic separator |
|
|
88
|
+
|
|
89
|
+
### Editorial CSS
|
|
90
|
+
|
|
91
|
+
The design layer provides 105 gallery plates across 14 categories. These are CSS and markup recipes, not 105 separately exported React components.
|
|
92
|
+
|
|
93
|
+
| Category | Examples |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| Buttons | Offset, rule, highlighter, swash, postmark, crop marks |
|
|
96
|
+
| Checkboxes | Ink tick, proof mark, strike, circled, halftone |
|
|
97
|
+
| Switches | Print-inspired on/off controls |
|
|
98
|
+
| Radios | Numerals, targets, section tabs, tier cards |
|
|
99
|
+
| Fields | Underlined inputs and subscription fields |
|
|
100
|
+
| Textareas | Editorial writing fields |
|
|
101
|
+
| Rules | Masthead, double, dotted and ornamental rules |
|
|
102
|
+
| Backgrounds | Newsprint, halftone, hatching and crop marks |
|
|
103
|
+
| Typography | Headlines, drop caps, columns and footnotes |
|
|
104
|
+
| Layout | Navigation, tickers, cards, lists and pagination |
|
|
105
|
+
| Disclosure | Accordions, tabs, tooltips and menus |
|
|
106
|
+
| Feedback | Notices, progress, skeletons and loaders |
|
|
107
|
+
| Motion | Rising headlines, marquees, counters and typewriters |
|
|
108
|
+
| Showcase | Covers, indexes, carousels, filters, charts and timelines |
|
|
109
|
+
|
|
110
|
+
## Button variants
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
import { Button } from "@editio-ui/react";
|
|
114
|
+
|
|
115
|
+
<Button className="ed-btn" data-variant="offset">Subscribe</Button>
|
|
116
|
+
<Button className="ed-btn" data-variant="rule">Read the story</Button>
|
|
117
|
+
<Button className="ed-btn" data-variant="highlight">Most read</Button>
|
|
118
|
+
<Button className="ed-btn" data-variant="swash">Join the list</Button>
|
|
119
|
+
<Button className="ed-btn" data-variant="crop">Download PDF</Button>
|
|
120
|
+
<Button className="ed-btn" data-variant="halftone">Print edition</Button>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Some variants require additional markup, such as the postmark SVG, roll label or menu bars. Use the gallery's corresponding HTML or React recipe for those variants.
|
|
124
|
+
|
|
125
|
+
## Controlled components
|
|
126
|
+
|
|
127
|
+
```tsx
|
|
128
|
+
import { useState } from "react";
|
|
129
|
+
import { Checkbox, RadioGroup } from "@editio-ui/react";
|
|
130
|
+
|
|
131
|
+
export function Preferences() {
|
|
132
|
+
const [checked, setChecked] = useState(false);
|
|
133
|
+
const [edition, setEdition] = useState("digital");
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
<>
|
|
137
|
+
<label className="ed-field">
|
|
138
|
+
<Checkbox className="ed-check" data-variant="tick"
|
|
139
|
+
checked={checked} onCheckedChange={setChecked} />
|
|
140
|
+
Receive updates
|
|
141
|
+
</label>
|
|
142
|
+
<RadioGroup.Root aria-label="Edition" name="edition"
|
|
143
|
+
value={edition} onValueChange={setEdition}>
|
|
144
|
+
<label><RadioGroup.Item value="digital" /> Digital</label>
|
|
145
|
+
<label><RadioGroup.Item value="print" /> Print</label>
|
|
146
|
+
</RadioGroup.Root>
|
|
147
|
+
</>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Use with native HTML
|
|
153
|
+
|
|
154
|
+
The editorial stylesheet does not depend on React component behavior. Load it through your build tool and use the same classes in HTML:
|
|
155
|
+
|
|
156
|
+
```html
|
|
157
|
+
<button class="ed-btn" data-variant="offset">Subscribe</button>
|
|
158
|
+
<label class="ed-field">
|
|
159
|
+
<input type="checkbox" class="ed-check" data-variant="proof" />
|
|
160
|
+
Approved
|
|
161
|
+
</label>
|
|
162
|
+
<div class="ed-bg" data-bg="fade"></div>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Themes
|
|
166
|
+
|
|
167
|
+
Apply `data-ed-theme` to a container to change its palette.
|
|
168
|
+
|
|
169
|
+
| Theme | Character |
|
|
170
|
+
| --- | --- |
|
|
171
|
+
| `mono` | White stock, black ink and grey accents (default) |
|
|
172
|
+
| `graphite` | Near-black stock and off-white ink |
|
|
173
|
+
| `bone` | Warm grey paper and soft black |
|
|
174
|
+
| `slate` | Cool grey and muted blue-grey |
|
|
175
|
+
| `oxide` | Warm paper and brick red |
|
|
176
|
+
|
|
177
|
+
```tsx
|
|
178
|
+
<section data-ed-theme="oxide" data-ed-surface="paper">
|
|
179
|
+
<Button className="ed-btn" data-variant="offset">Read the issue</Button>
|
|
180
|
+
</section>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Use `data-ed-surface="paper"`, `"ink"` or `"accent"` to switch local surface colors. Themes and surfaces can be nested.
|
|
184
|
+
|
|
185
|
+
### Custom tokens
|
|
186
|
+
|
|
187
|
+
Load your overrides after Editio's stylesheet:
|
|
188
|
+
|
|
189
|
+
```css
|
|
190
|
+
[data-ed-theme="oxide"] {
|
|
191
|
+
--ed-p-paper: #f5f0e7;
|
|
192
|
+
--ed-p-ink: #20201d;
|
|
193
|
+
--ed-p-accent: #963b30;
|
|
194
|
+
--ed-p-on-accent: #ffffff;
|
|
195
|
+
--ed-radius: 0px;
|
|
196
|
+
--ed-hair: 1px;
|
|
197
|
+
--ed-thick: 3px;
|
|
198
|
+
--ed-dot: 7px;
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Typography is configurable through `--ed-font-display`, `--ed-font-swash`, `--ed-font-text` and `--ed-font-mono`.
|
|
203
|
+
|
|
204
|
+
## Stylesheet imports
|
|
205
|
+
|
|
206
|
+
Import the complete design layer, or choose individual CSS modules. Import tokens first when using individual modules.
|
|
207
|
+
|
|
208
|
+
```tsx
|
|
209
|
+
import "@editio-ui/react/editorial/tokens.css";
|
|
210
|
+
import "@editio-ui/react/editorial/buttons.css";
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Available modules: `tokens`, `buttons`, `choices`, `fields`, `backgrounds`, `type`, `disclosure`, `feedback`, `motion` and `showcase` (each with a `.css` extension).
|
|
214
|
+
|
|
215
|
+
The optional `@editio-ui/react/fonts.css` imports Archivo, Bodoni Moda, Newsreader and JetBrains Mono from Google Fonts. Font files are not bundled. Omit this import if you prefer system fallbacks or self-hosted fonts.
|
|
216
|
+
|
|
217
|
+
## Accessibility and motion
|
|
218
|
+
|
|
219
|
+
Editio's primitives use native HTML controls where possible, preserving browser keyboard and form behavior. The editorial layer includes reduced-motion styles. Provide meaningful labels, accessible names and appropriate semantics when composing your own interfaces. Test your finished application for accessibility and browser compatibility.
|
|
220
|
+
|
|
221
|
+
## Updating
|
|
222
|
+
|
|
223
|
+
```sh
|
|
224
|
+
npm install @editio-ui/react@latest
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## Development from source
|
|
228
|
+
|
|
229
|
+
The repository uses pnpm workspaces. Its source README specifies Node 22.22.2 or later for development tooling.
|
|
230
|
+
|
|
231
|
+
```sh
|
|
232
|
+
pnpm install
|
|
233
|
+
pnpm --filter @editio-ui/react build
|
|
234
|
+
pnpm --filter gallery dev
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
The gallery provides a theme studio and copyable HTML, CSS and React recipes. To run the documentation site:
|
|
238
|
+
|
|
239
|
+
```sh
|
|
240
|
+
pnpm dev:docs
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
To validate the source:
|
|
244
|
+
|
|
245
|
+
```sh
|
|
246
|
+
pnpm --filter @editio-ui/react typecheck
|
|
247
|
+
pnpm --filter @editio-ui/react test
|
|
248
|
+
pnpm --filter gallery test
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Project status
|
|
252
|
+
|
|
253
|
+
Editio is in early development. Public APIs and design recipes may evolve before the stable release.
|
|
254
|
+
|
|
255
|
+
## License
|
|
256
|
+
|
|
257
|
+
MIT, as declared in the package metadata.
|
|
@@ -25,10 +25,6 @@
|
|
|
25
25
|
.ed-btn:focus-visible { outline: 2px solid var(--ed-accent); outline-offset: 4px; }
|
|
26
26
|
.ed-btn:disabled,
|
|
27
27
|
.ed-btn[aria-disabled="true"] { opacity: 0.38; cursor: not-allowed; pointer-events: none; }
|
|
28
|
-
|
|
29
|
-
.ed-btn { min-height: 44px; box-sizing: border-box; font: 500 .875rem/1.25 var(--ed-font-display); letter-spacing: .015em; text-transform: none; border-width: 1px; }
|
|
30
|
-
.ed-btn:focus-visible { outline-color: var(--ed-ink); }
|
|
31
|
-
@media (prefers-reduced-motion: reduce) { .ed-btn, .ed-btn *, .ed-btn::before, .ed-btn::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
|
|
32
28
|
/* @end */
|
|
33
29
|
|
|
34
30
|
/* @variant buttons/offset */
|
|
@@ -40,10 +36,6 @@
|
|
|
40
36
|
}
|
|
41
37
|
.ed-btn[data-variant="offset"]:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ed-accent); }
|
|
42
38
|
.ed-btn[data-variant="offset"]:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ed-accent); }
|
|
43
|
-
|
|
44
|
-
.ed-btn[data-variant="offset"] { box-shadow: 2px 2px 0 var(--ed-accent); }
|
|
45
|
-
.ed-btn[data-variant="offset"]:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ed-accent); }
|
|
46
|
-
.ed-btn[data-variant="offset"]:active { transform: translate(2px,2px); box-shadow: none; }
|
|
47
39
|
/* @end */
|
|
48
40
|
|
|
49
41
|
/* @variant buttons/rule */
|
|
@@ -64,8 +56,6 @@
|
|
|
64
56
|
}
|
|
65
57
|
.ed-btn[data-variant="rule"]:hover { background-size: 100% 5px; }
|
|
66
58
|
.ed-btn[data-variant="rule"]:hover::after { transform: translateX(0.35em); }
|
|
67
|
-
|
|
68
|
-
.ed-btn[data-variant="rule"]:hover { background-size: 100% 3px; }
|
|
69
59
|
/* @end */
|
|
70
60
|
|
|
71
61
|
/* @variant buttons/highlight */
|
|
@@ -91,8 +81,6 @@
|
|
|
91
81
|
background: var(--ed-paper);
|
|
92
82
|
}
|
|
93
83
|
.ed-btn[data-variant="swash"]:hover { background: var(--ed-ink); color: var(--ed-paper); }
|
|
94
|
-
|
|
95
|
-
.ed-btn[data-variant="swash"] { border-radius: var(--ed-radius); font-size: 1.25rem; }
|
|
96
84
|
/* @end */
|
|
97
85
|
|
|
98
86
|
/* @variant buttons/stamp */
|
|
@@ -132,8 +120,6 @@
|
|
|
132
120
|
.ed-btn[data-variant="stamp"]:hover svg { animation-duration: 5s; }
|
|
133
121
|
@keyframes ed-spin { to { transform: rotate(360deg); } }
|
|
134
122
|
@media (prefers-reduced-motion: reduce) { .ed-btn[data-variant="stamp"] svg { animation: none; } }
|
|
135
|
-
|
|
136
|
-
.ed-btn[data-variant="stamp"] { background: var(--ed-paper); color: var(--ed-ink); border: 1px solid currentColor; }
|
|
137
123
|
/* @end */
|
|
138
124
|
|
|
139
125
|
/* @variant buttons/roll */
|
|
@@ -46,12 +46,6 @@
|
|
|
46
46
|
.ed-choice { position: relative; display: inline-flex; cursor: pointer; }
|
|
47
47
|
.ed-choice > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
|
|
48
48
|
.ed-choice > input:focus-visible + span { outline: 2px solid var(--ed-accent); outline-offset: 3px; }
|
|
49
|
-
|
|
50
|
-
.ed-field { min-height: 44px; font: 400 .9375rem/1.45 var(--ed-font-display); gap: .85rem; }
|
|
51
|
-
.ed-check:focus-visible, .ed-radio:focus-visible, .ed-switch:focus-visible, .ed-choice > input:focus-visible + span { outline-color: var(--ed-ink); }
|
|
52
|
-
.ed-stack { gap: .5rem; }
|
|
53
|
-
.ed-choice > span { box-sizing: border-box; }
|
|
54
|
-
@media (prefers-reduced-motion: reduce) { .ed-check, .ed-radio, .ed-switch, .ed-choice > span, .ed-check::before, .ed-check::after, .ed-radio::before, .ed-radio::after, .ed-switch::before, .ed-switch::after { transition-duration: .01ms !important; } }
|
|
55
49
|
/* @end */
|
|
56
50
|
|
|
57
51
|
/* ---------- checkboxes ---------- */
|
|
@@ -63,8 +57,6 @@
|
|
|
63
57
|
border: 1.5px solid currentColor;
|
|
64
58
|
border-radius: var(--ed-radius);
|
|
65
59
|
}
|
|
66
|
-
|
|
67
|
-
.ed-check { border-width: 1px; }
|
|
68
60
|
/* @end */
|
|
69
61
|
|
|
70
62
|
/* @variant checkboxes/tick */
|
|
@@ -176,8 +168,6 @@
|
|
|
176
168
|
}
|
|
177
169
|
.ed-choice:hover > .ed-check[data-variant="chip"] + span { background: var(--ed-paper-2); }
|
|
178
170
|
.ed-check[data-variant="chip"]:checked + span { background: var(--ed-ink); color: var(--ed-paper); }
|
|
179
|
-
|
|
180
|
-
.ed-check[data-variant="chip"] + span { min-height: 44px; display: inline-flex; align-items: center; font-weight: 500; letter-spacing: .025em; }
|
|
181
171
|
/* @end */
|
|
182
172
|
|
|
183
173
|
/* ---------- switches ---------- */
|
|
@@ -367,8 +357,4 @@
|
|
|
367
357
|
.ed-radio[data-variant="plan"] + span small { font: 500 0.75rem/1.3 var(--ed-font-mono); opacity: 0.7; }
|
|
368
358
|
.ed-choice:hover > .ed-radio[data-variant="plan"] + span { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ed-ink); }
|
|
369
359
|
.ed-radio[data-variant="plan"]:checked + span { background: var(--ed-ink); color: var(--ed-paper); box-shadow: 5px 5px 0 var(--ed-accent); transform: translate(-3px, -3px); }
|
|
370
|
-
|
|
371
|
-
.ed-radio[data-variant="plan"] + span { border-width: 1px; }
|
|
372
|
-
.ed-choice:hover > .ed-radio[data-variant="plan"] + span { transform: none; box-shadow: inset 0 -2px var(--ed-ink); }
|
|
373
|
-
.ed-radio[data-variant="plan"]:checked + span { transform: none; box-shadow: inset 0 -3px var(--ed-accent); }
|
|
374
360
|
/* @end */
|
|
@@ -91,8 +91,6 @@
|
|
|
91
91
|
.ed-accordion details::details-content { transition: none; }
|
|
92
92
|
.ed-accordion details[open] .ed-accordion__body { animation: none; }
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
.ed-accordion summary { min-height: 44px; } .ed-accordion summary:hover { padding-left: 0; } .ed-accordion summary:focus-visible { outline-color: var(--ed-ink); }
|
|
96
94
|
/* @end */
|
|
97
95
|
|
|
98
96
|
/* @variant disclosure/tabs */
|
|
@@ -154,8 +152,6 @@
|
|
|
154
152
|
.ed-tabs__list::after { transition: none; }
|
|
155
153
|
.ed-tabs__panel { animation: none !important; }
|
|
156
154
|
}
|
|
157
|
-
|
|
158
|
-
.ed-tabs .ed-radio[data-variant="slide"] + span { min-height: 44px; font-weight: 500; letter-spacing: .025em; }
|
|
159
155
|
/* @end */
|
|
160
156
|
|
|
161
157
|
/* @variant disclosure/tooltip */
|
|
@@ -248,8 +244,6 @@
|
|
|
248
244
|
@keyframes ed-drop-in { from { opacity: 0; clip-path: inset(0 -8px 100% -8px); } to { opacity: 1; clip-path: inset(0 -8px -8px -8px); } }
|
|
249
245
|
@keyframes ed-rise-in { from { opacity: 0; transform: translateY(0.5rem); } }
|
|
250
246
|
@media (prefers-reduced-motion: reduce) { .ed-drop__panel, .ed-drop__panel li { animation: none; } .ed-drop__panel a { transition: none; } }
|
|
251
|
-
|
|
252
|
-
.ed-drop__panel { box-shadow: none; } .ed-drop__panel a { min-height: 44px; }
|
|
253
247
|
/* @end */
|
|
254
248
|
|
|
255
249
|
/* @variant disclosure/redact */
|
|
@@ -37,8 +37,6 @@
|
|
|
37
37
|
.ed-note[data-tone="solid"] { color: var(--ed-paper); background: var(--ed-ink); }
|
|
38
38
|
@keyframes ed-note-draw { from { transform: scaleY(0); } }
|
|
39
39
|
@media (prefers-reduced-motion: reduce) { .ed-note::before { animation: none; } }
|
|
40
|
-
|
|
41
|
-
.ed-note { border-radius: 0; } .ed-note__label { letter-spacing: .06em; }
|
|
42
40
|
/* @end */
|
|
43
41
|
|
|
44
42
|
/* @variant feedback/live */
|
|
@@ -73,8 +71,6 @@
|
|
|
73
71
|
.ed-live time { font: 500 0.6875rem/1 var(--ed-font-mono); letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75; }
|
|
74
72
|
@keyframes ed-live-ring { 0% { box-shadow: 0 0 0 0 var(--ed-accent); } 70%, 100% { box-shadow: 0 0 0 0.7rem transparent; } }
|
|
75
73
|
@media (prefers-reduced-motion: reduce) { .ed-live__tag::before { animation: none; } }
|
|
76
|
-
|
|
77
|
-
.ed-live { flex-wrap: wrap; } .ed-live__text { min-width: min(100%, 12rem); }
|
|
78
74
|
/* @end */
|
|
79
75
|
|
|
80
76
|
/* @variant feedback/toast */
|
|
@@ -127,8 +123,6 @@
|
|
|
127
123
|
}
|
|
128
124
|
@keyframes ed-toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
|
|
129
125
|
@media (prefers-reduced-motion: reduce) { .ed-toast, .ed-toast::after { animation: none; } }
|
|
130
|
-
|
|
131
|
-
.ed-toast { box-shadow: none; border: 1px solid var(--ed-ink); }
|
|
132
126
|
/* @end */
|
|
133
127
|
|
|
134
128
|
/* @variant feedback/progress */
|
|
@@ -35,12 +35,6 @@
|
|
|
35
35
|
.ed-textarea:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
36
36
|
.ed-input:user-invalid,
|
|
37
37
|
.ed-textarea:user-invalid { border-color: var(--ed-hot); }
|
|
38
|
-
|
|
39
|
-
.ed-label { font: 500 .8125rem/1.4 var(--ed-font-display); text-transform: none; letter-spacing: .015em; color: var(--ed-ink); }
|
|
40
|
-
.ed-input, .ed-textarea { box-sizing: border-box; min-height: 44px; font: 400 1rem/1.5 var(--ed-font-display); }
|
|
41
|
-
.ed-input::placeholder, .ed-textarea::placeholder { font-style: normal; opacity: 1; }
|
|
42
|
-
.ed-input:focus-visible, .ed-textarea:focus-visible { outline-color: var(--ed-ink); }
|
|
43
|
-
.ed-input[aria-invalid="true"], .ed-textarea[aria-invalid="true"] { border-color: var(--ed-hot); box-shadow: inset 0 -2px var(--ed-hot); }
|
|
44
38
|
/* @end */
|
|
45
39
|
|
|
46
40
|
/* @variant fields/underline */
|
|
@@ -65,8 +59,6 @@
|
|
|
65
59
|
}
|
|
66
60
|
.ed-input[data-variant="notch"] { padding: 0.95em 1rem; border: 1.5px solid var(--ed-ink); }
|
|
67
61
|
.ed-input[data-variant="notch"]:focus-visible { outline: 0; box-shadow: 4px 4px 0 var(--ed-accent); }
|
|
68
|
-
|
|
69
|
-
.ed-input[data-variant="notch"]:focus-visible { outline: 2px solid var(--ed-ink); outline-offset: 3px; box-shadow: none; }
|
|
70
62
|
/* @end */
|
|
71
63
|
|
|
72
64
|
/* @variant fields/subscribe */
|
|
@@ -91,8 +83,6 @@
|
|
|
91
83
|
}
|
|
92
84
|
.ed-input[data-variant="giant"]::placeholder { color: var(--ed-ink); opacity: 0.18; font-style: normal; }
|
|
93
85
|
.ed-input[data-variant="giant"]:focus-visible { outline: 0; border-bottom-color: var(--ed-accent); }
|
|
94
|
-
|
|
95
|
-
.ed-input[data-variant="giant"]::placeholder { color: var(--ed-ink-2); opacity: 1; }
|
|
96
86
|
/* @end */
|
|
97
87
|
|
|
98
88
|
/* @variant fields/typewriter */
|
|
@@ -120,8 +110,6 @@
|
|
|
120
110
|
background-attachment: local;
|
|
121
111
|
resize: vertical;
|
|
122
112
|
}
|
|
123
|
-
|
|
124
|
-
.ed-textarea[data-variant="ruled"] { font-family: var(--ed-font-text); padding-left: 2rem; background: linear-gradient(90deg, transparent 1.45rem, var(--ed-hot) 1.45rem calc(1.45rem + 1px), transparent calc(1.45rem + 1px)), repeating-linear-gradient(transparent 0 calc(2rem - 1px), var(--ed-tint) calc(2rem - 1px) 2rem); background-attachment: local; }
|
|
125
113
|
/* @end */
|
|
126
114
|
|
|
127
115
|
/* @variant textareas/double */
|
|
@@ -134,8 +122,6 @@
|
|
|
134
122
|
resize: vertical;
|
|
135
123
|
}
|
|
136
124
|
.ed-textarea[data-variant="double"]:focus-visible { outline-offset: 4px; }
|
|
137
|
-
|
|
138
|
-
.ed-textarea[data-variant="double"] { border-width: 3px; background: var(--ed-paper); }
|
|
139
125
|
/* @end */
|
|
140
126
|
|
|
141
127
|
/* ---------- rules ---------- */
|
|
@@ -162,8 +148,6 @@
|
|
|
162
148
|
linear-gradient(currentColor 0 0) 0 0 / 100% 8px no-repeat,
|
|
163
149
|
linear-gradient(currentColor 0 0) 0 100% / 100% var(--ed-hair) no-repeat;
|
|
164
150
|
}
|
|
165
|
-
|
|
166
|
-
.ed-rule[data-variant="masthead"] { height: 9px; background-size: 100% 4px, 100% var(--ed-hair); }
|
|
167
151
|
/* @end */
|
|
168
152
|
|
|
169
153
|
/* @variant rules/dotted */
|
|
@@ -66,8 +66,6 @@
|
|
|
66
66
|
100% { transform: translateY(-80%); }
|
|
67
67
|
}
|
|
68
68
|
@media (prefers-reduced-motion: reduce) { .ed-cycle__list { animation: none; } }
|
|
69
|
-
|
|
70
|
-
.ed-cycle-line { letter-spacing: -.015em; }
|
|
71
69
|
/* @end */
|
|
72
70
|
|
|
73
71
|
/* @variant motion/count */
|
|
@@ -92,8 +90,6 @@
|
|
|
92
90
|
.ed-counts__label { margin: 0; font: 700 0.6875rem/1.3 var(--ed-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ed-ink-2); }
|
|
93
91
|
@keyframes ed-count { from { --ed-n: 0; } to { --ed-n: var(--ed-to); } }
|
|
94
92
|
@media (prefers-reduced-motion: reduce) { .ed-count { animation: none; } }
|
|
95
|
-
|
|
96
|
-
.ed-counts { border-top-width: 1px; gap: 2rem; }
|
|
97
93
|
/* @end */
|
|
98
94
|
|
|
99
95
|
/* @variant motion/sweep */
|
|
@@ -76,8 +76,6 @@
|
|
|
76
76
|
.ed-index a:focus-visible::after { transform: none; opacity: 1; }
|
|
77
77
|
@media (max-width: 34rem) { .ed-index a { grid-template-columns: 2rem minmax(0, 1fr) auto auto; } .ed-index__thumb { display: none; } }
|
|
78
78
|
@media (prefers-reduced-motion: reduce) { .ed-index li, .ed-index__thumb, .ed-index__title, .ed-index a::after { transition: none; } }
|
|
79
|
-
|
|
80
|
-
.ed-index:has(a:is(:hover, :focus-visible)) li:not(:has(a:is(:hover, :focus-visible))) { opacity: .7; }
|
|
81
79
|
/* @end */
|
|
82
80
|
|
|
83
81
|
/* @variant showcase/flip */
|
|
@@ -158,8 +156,6 @@
|
|
|
158
156
|
100% { opacity: 0.35; scale: 0.94; }
|
|
159
157
|
}
|
|
160
158
|
@media (prefers-reduced-motion: reduce) { .ed-carousel__track { scroll-behavior: auto; } .ed-slide { transition: none; animation: none !important; } }
|
|
161
|
-
|
|
162
|
-
.ed-slide:hover { transform: none; box-shadow: inset 0 -3px var(--ed-accent); }
|
|
163
159
|
/* @end */
|
|
164
160
|
|
|
165
161
|
/* @variant showcase/filter */
|
|
@@ -176,8 +172,6 @@
|
|
|
176
172
|
.ed-filter:has(input[value="essay"]:checked) .ed-filter__item:not([data-topic="essay"]) { display: none; }
|
|
177
173
|
@keyframes ed-filter-in { from { opacity: 0; transform: translateY(0.8rem) scale(0.96); } }
|
|
178
174
|
@media (prefers-reduced-motion: reduce) { .ed-filter__item { animation: none; } }
|
|
179
|
-
|
|
180
|
-
.ed-filter__item { border-width: 1px; }
|
|
181
175
|
/* @end */
|
|
182
176
|
|
|
183
177
|
/* @variant showcase/chart */
|
package/dist/editorial/type.css
CHANGED
|
@@ -92,8 +92,6 @@
|
|
|
92
92
|
font-stretch: 118%;
|
|
93
93
|
color: var(--ed-ink);
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
.ed-dropcap { line-height: 1.7; max-width: 60ch; }
|
|
97
95
|
/* @end */
|
|
98
96
|
|
|
99
97
|
/* @variant type/quote */
|
|
@@ -114,8 +112,6 @@
|
|
|
114
112
|
color: var(--ed-accent);
|
|
115
113
|
}
|
|
116
114
|
.ed-quote footer { margin-top: 1rem; font: 700 0.6875rem/1 var(--ed-font-display); letter-spacing: 0.15em; text-transform: uppercase; }
|
|
117
|
-
|
|
118
|
-
.ed-quote { border-top-width: 2px; padding-top: 1.5rem; }
|
|
119
115
|
/* @end */
|
|
120
116
|
|
|
121
117
|
/* @variant type/ticker */
|
|
@@ -200,8 +196,6 @@
|
|
|
200
196
|
}
|
|
201
197
|
.ed-card:hover .ed-card__title a,
|
|
202
198
|
.ed-card__title a:focus-visible { background-size: 100% 0.2em; }
|
|
203
|
-
|
|
204
|
-
.ed-card { gap: 1rem; } .ed-card__title { font: 500 1.75rem/1.1 var(--ed-font-text); letter-spacing: -.02em; }
|
|
205
199
|
/* @end */
|
|
206
200
|
|
|
207
201
|
/* @variant type/pager */
|
|
@@ -226,8 +220,6 @@
|
|
|
226
220
|
.ed-pager__step[rel="next"]::after { content: ""; }
|
|
227
221
|
.ed-pager__step[rel="prev"]:hover::before { transform: scaleX(-1) translateX(0.3em); }
|
|
228
222
|
.ed-pager__step[rel="next"]:hover::after { transform: translateX(0.3em); }
|
|
229
|
-
|
|
230
|
-
.ed-pager ol a { min-width: 44px; min-height: 44px; }
|
|
231
223
|
/* @end */
|
|
232
224
|
|
|
233
225
|
/* @variant type/badge */
|