ply-css 1.4.0 → 1.5.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/CLAUDE.md +1 -1
- package/PLY.md +32 -5
- package/README.md +2 -2
- package/dist/css/ply-core.css +60 -0
- package/dist/css/ply-core.min.css +1 -1
- package/dist/css/ply-essentials.min.css +1 -1
- package/dist/css/ply-helpers.min.css +1 -1
- package/dist/css/ply.css +60 -0
- package/dist/css/ply.min.css +1 -1
- package/dist/css/styles.css +60 -0
- package/dist/css/styles.min.css +1 -1
- package/llms-full.txt +4 -4
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/ply-classes.json +42 -19
- package/src/scss/components/_colors.scss +48 -0
package/CLAUDE.md
CHANGED
|
@@ -7,7 +7,7 @@ This is the ply CSS framework repository. See **PLY.md** for the complete class
|
|
|
7
7
|
**`ply-classes.json`** is the complete searchable reference. Before writing any custom CSS, search it first:
|
|
8
8
|
|
|
9
9
|
- **`classes`** — Every ply class with category, description, and examples. Search here before inventing a class name.
|
|
10
|
-
- **`customProperties`** — All
|
|
10
|
+
- **`customProperties`** — All 120+ `--ply-*` CSS variables organized by category (typography, background, text, borders, interactive, elevation, brand, palette, color surfaces) with light/dark values. Use these instead of hardcoding colors or font stacks.
|
|
11
11
|
- **`semanticElements`** — Every HTML element ply auto-styles (`<dialog>`, `<details>`, `<table>`, `<code>`, `<kbd>`, `<mark>`, `<progress>`, `<meter>`, etc.) with tips on usage. Check here before building a custom component — ply may already style the native element.
|
|
12
12
|
|
|
13
13
|
**Rule: If you're about to write custom CSS, search `ply-classes.json` first.** If a class, variable, or semantic element already does what you need, use it.
|
package/PLY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# PLY — AI-Ready CSS Framework
|
|
2
2
|
|
|
3
|
-
ply is a ratio-based, flexbox CSS framework with dark mode, accessibility defaults, and a small footprint (
|
|
3
|
+
ply is a ratio-based, flexbox CSS framework with dark mode, accessibility defaults, and a small footprint (~21KB gzip full, ~17KB core). 457 utility classes, 120+ CSS custom properties, 13 auto-styled semantic elements.
|
|
4
4
|
|
|
5
5
|
**Differentiators:** Small bundle, AI-parseable class system, accessible out of the box, dark mode built-in.
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ ply is a ratio-based, flexbox CSS framework with dark mode, accessibility defaul
|
|
|
9
9
|
**`ply-classes.json`** is the complete searchable reference. Before writing any custom CSS, search it first:
|
|
10
10
|
|
|
11
11
|
- **`classes`** — Every ply class (457) with category, description, and usage examples. Search here before inventing a class name or writing a custom style.
|
|
12
|
-
- **`customProperties`** — All `--ply-*` CSS variables organized by category (background, text, borders, interactive, forms, code, tables, buttons, navigation, elevation, brand, palette). Each entry includes light and dark mode values. Use these instead of hardcoding colors.
|
|
12
|
+
- **`customProperties`** — All `--ply-*` CSS variables organized by category (background, text, borders, interactive, forms, code, tables, buttons, navigation, elevation, brand, palette, colorSurfaces, spacing). Each entry includes light and dark mode values. Use these instead of hardcoding colors.
|
|
13
13
|
- **`semanticElements`** — Every HTML element ply auto-styles (`<dialog>`, `<details>`, `<table>`, `<code>`, `<kbd>`, `<mark>`, `<progress>`, `<meter>`, headings, form controls) with styling details and usage tips. Check here before building a custom component.
|
|
14
14
|
|
|
15
15
|
The JSON is the source of truth. If a class, variable, or semantic element already does what you need, use it instead of writing custom CSS.
|
|
@@ -55,6 +55,33 @@ See `customProperties` in `ply-classes.json` for the full list of overridable va
|
|
|
55
55
|
|
|
56
56
|
ply uses `color-mix()` to auto-compute hover/active button states from your base color. This works in all modern browsers (Chrome 111+, Firefox 113+, Safari 16.4+, Edge 111+). On older browsers (pre-2023), `color-mix()` is ignored and the fallback hex values from ply's default theme are used instead. For custom themes targeting legacy browsers, also set `--ply-btn-default-bg-hover`, `--ply-btn-default-bg-active`, `--ply-btn-secondary-bg-hover`, and `--ply-btn-secondary-bg-active` explicitly. In modern browsers, `color-mix()` overrides these fallbacks automatically.
|
|
57
57
|
|
|
58
|
+
## Color Surfaces
|
|
59
|
+
|
|
60
|
+
Theme-aware surface and border colors for building colored cards, badges, and alerts that work in both light and dark mode. Available for all 10 palette colors: blue, red, green, yellow, indigo, purple, pink, orange, teal, cyan.
|
|
61
|
+
|
|
62
|
+
| Variable | Light Mode | Dark Mode | Use |
|
|
63
|
+
|---|---|---|---|
|
|
64
|
+
| `--ply-{color}-surface` | Pastel | Dark muted | Card/badge background |
|
|
65
|
+
| `--ply-{color}-border` | Light tint | Medium dark | Colored borders |
|
|
66
|
+
| `--ply-{color}-1` | Base | Lighter | Text on surface, icons |
|
|
67
|
+
| `--ply-{color}-2` | Darker | Medium | Emphasis |
|
|
68
|
+
| `--ply-{color}-3` | Darkest | Lightest | Subtle accent |
|
|
69
|
+
|
|
70
|
+
```css
|
|
71
|
+
/* Theme-aware colored card */
|
|
72
|
+
.card-info {
|
|
73
|
+
background: var(--ply-blue-surface);
|
|
74
|
+
border: 1px solid var(--ply-blue-border);
|
|
75
|
+
color: var(--ply-blue-1);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.card-danger {
|
|
79
|
+
background: var(--ply-red-surface);
|
|
80
|
+
border: 1px solid var(--ply-red-border);
|
|
81
|
+
color: var(--ply-red-1);
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
58
85
|
## Philosophy: Start Semantic
|
|
59
86
|
|
|
60
87
|
ply automatically styles semantic HTML elements — tables, code blocks, blockquotes, navs, details/summary, dialogs, progress bars, meters, forms, and more. Before reaching for a `<div>` with a custom class, check if a semantic element already does what you need. Custom styling is fine when you need it, but start with what HTML and ply give you for free.
|
|
@@ -640,7 +667,7 @@ Ready-to-use HTML examples are in the `snippets/` directory:
|
|
|
640
667
|
|
|
641
668
|
| Bundle | Includes | Size (gzip) |
|
|
642
669
|
|--------|----------|-------------|
|
|
643
|
-
| `ply.min.css` | Everything |
|
|
670
|
+
| `ply.min.css` | Everything | ~21KB |
|
|
644
671
|
| `ply-core.min.css` | Grid, buttons, forms, nav, alerts, tables, typography, essential helpers | ~17KB |
|
|
645
|
-
| `ply-essentials.min.css` | Grid, helpers, alignments, blocks only | ~
|
|
646
|
-
| `ply-helpers.min.css` | Helper utilities only | ~
|
|
672
|
+
| `ply-essentials.min.css` | Grid, helpers, alignments, blocks only | ~7KB |
|
|
673
|
+
| `ply-helpers.min.css` | Helper utilities only | ~5KB |
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A ratio-based, AI-ready CSS framework with dark mode, accessibility, and a small footprint.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**~21KB gzipped. No JavaScript. No build step. One `<link>` tag.**
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -37,7 +37,7 @@ CSS frameworks were designed for humans reading documentation. But increasingly,
|
|
|
37
37
|
- **Start semantic** — ply automatically styles `<nav>`, `<table>`, `<code>`, `<blockquote>`, `<details>`, `<dialog>`, and more. Start with what HTML gives you, then reach for classes when you need them.
|
|
38
38
|
- **AI-native** — ships with `PLY.md` (AI instruction file) and `ply-classes.json` (machine-readable class reference). Class names are predictable: `.alert-blue`, `.btn-sm`, `.unit-50`.
|
|
39
39
|
- **Accessible by default** — `:focus-visible` outlines on all interactive elements (including `<summary>` and legacy components), `prefers-reduced-motion`, `prefers-color-scheme` dark mode, semantic HTML styling, WCAG AA contrast in both light and dark themes. Published [VPAT 2.5](https://plycss.com/docs/vpat) documenting conformance against all WCAG 2.1 Level A and AA criteria.
|
|
40
|
-
- **Small footprint** —
|
|
40
|
+
- **Small footprint** — ~21KB gzipped (full), ~17KB (core). No JavaScript runtime, no build step, no tree-shaking.
|
|
41
41
|
- **Ratio-based grid** — think in percentages, not arbitrary columns. `unit-50` is 50%, `unit-33` is 33%. Responsive prefixes: `tablet-unit-*`, `phone-unit-*`.
|
|
42
42
|
- **Custom theming** — override `--ply-*` CSS custom properties to create any theme. Light and dark modes built in.
|
|
43
43
|
|
package/dist/css/ply-core.css
CHANGED
|
@@ -70,6 +70,26 @@
|
|
|
70
70
|
--ply-bg-yellow: #f1c21b;
|
|
71
71
|
--ply-bg-yellow-hover: #d2a106;
|
|
72
72
|
--ply-bg-yellow-active: #b28600;
|
|
73
|
+
--ply-blue-surface: #d3e3fb;
|
|
74
|
+
--ply-red-surface: #f8d5d8;
|
|
75
|
+
--ply-green-surface: #d5ecd9;
|
|
76
|
+
--ply-yellow-surface: #fff4cc;
|
|
77
|
+
--ply-indigo-surface: #e0e7ff;
|
|
78
|
+
--ply-purple-surface: #ede9fe;
|
|
79
|
+
--ply-pink-surface: #fce7f3;
|
|
80
|
+
--ply-orange-surface: #ffedd5;
|
|
81
|
+
--ply-teal-surface: #ccfbf1;
|
|
82
|
+
--ply-cyan-surface: #cffafe;
|
|
83
|
+
--ply-blue-border: #92baf6;
|
|
84
|
+
--ply-red-border: #ef969d;
|
|
85
|
+
--ply-green-border: #96cfa1;
|
|
86
|
+
--ply-yellow-border: #ffe480;
|
|
87
|
+
--ply-indigo-border: #a5b4fc;
|
|
88
|
+
--ply-purple-border: #c4b5fd;
|
|
89
|
+
--ply-pink-border: #f9a8d4;
|
|
90
|
+
--ply-orange-border: #fdba74;
|
|
91
|
+
--ply-teal-border: #5eead4;
|
|
92
|
+
--ply-cyan-border: #67e8f9;
|
|
73
93
|
--ply-blue-1: #0f62fe;
|
|
74
94
|
--ply-blue-2: #0043ce;
|
|
75
95
|
--ply-blue-3: #002d9c;
|
|
@@ -164,6 +184,26 @@
|
|
|
164
184
|
--ply-shadow-2: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
165
185
|
--ply-shadow-3: 0 4px 24px rgba(0, 0, 0, 0.4);
|
|
166
186
|
--ply-bg-glass: rgba(38, 38, 38, 0.25);
|
|
187
|
+
--ply-blue-surface: #1a2744;
|
|
188
|
+
--ply-red-surface: #3b1c1e;
|
|
189
|
+
--ply-green-surface: #1a2e1e;
|
|
190
|
+
--ply-yellow-surface: #332b10;
|
|
191
|
+
--ply-indigo-surface: #1e1b4b;
|
|
192
|
+
--ply-purple-surface: #2e1065;
|
|
193
|
+
--ply-pink-surface: #3b0a2a;
|
|
194
|
+
--ply-orange-surface: #331a08;
|
|
195
|
+
--ply-teal-surface: #132f2e;
|
|
196
|
+
--ply-cyan-surface: #133040;
|
|
197
|
+
--ply-blue-border: #1a52a5;
|
|
198
|
+
--ply-red-border: #b2232f;
|
|
199
|
+
--ply-green-border: #237f35;
|
|
200
|
+
--ply-yellow-border: #cca000;
|
|
201
|
+
--ply-indigo-border: #3730a3;
|
|
202
|
+
--ply-purple-border: #5b21b6;
|
|
203
|
+
--ply-pink-border: #9d174d;
|
|
204
|
+
--ply-orange-border: #c2410c;
|
|
205
|
+
--ply-teal-border: #0f766e;
|
|
206
|
+
--ply-cyan-border: #0e7490;
|
|
167
207
|
--ply-bg-blue: #0f62fe;
|
|
168
208
|
--ply-bg-blue-hover: #0043ce;
|
|
169
209
|
--ply-bg-blue-active: #002d9c;
|
|
@@ -260,6 +300,26 @@
|
|
|
260
300
|
--ply-shadow-2: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
261
301
|
--ply-shadow-3: 0 4px 24px rgba(0, 0, 0, 0.4);
|
|
262
302
|
--ply-bg-glass: rgba(38, 38, 38, 0.25);
|
|
303
|
+
--ply-blue-surface: #1a2744;
|
|
304
|
+
--ply-red-surface: #3b1c1e;
|
|
305
|
+
--ply-green-surface: #1a2e1e;
|
|
306
|
+
--ply-yellow-surface: #332b10;
|
|
307
|
+
--ply-indigo-surface: #1e1b4b;
|
|
308
|
+
--ply-purple-surface: #2e1065;
|
|
309
|
+
--ply-pink-surface: #3b0a2a;
|
|
310
|
+
--ply-orange-surface: #331a08;
|
|
311
|
+
--ply-teal-surface: #132f2e;
|
|
312
|
+
--ply-cyan-surface: #133040;
|
|
313
|
+
--ply-blue-border: #1a52a5;
|
|
314
|
+
--ply-red-border: #b2232f;
|
|
315
|
+
--ply-green-border: #237f35;
|
|
316
|
+
--ply-yellow-border: #cca000;
|
|
317
|
+
--ply-indigo-border: #3730a3;
|
|
318
|
+
--ply-purple-border: #5b21b6;
|
|
319
|
+
--ply-pink-border: #9d174d;
|
|
320
|
+
--ply-orange-border: #c2410c;
|
|
321
|
+
--ply-teal-border: #0f766e;
|
|
322
|
+
--ply-cyan-border: #0e7490;
|
|
263
323
|
--ply-bg-blue: #0f62fe;
|
|
264
324
|
--ply-bg-blue-hover: #0043ce;
|
|
265
325
|
--ply-bg-blue-active: #002d9c;
|