ply-css 1.5.0 → 1.6.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 +3 -1
- package/PLY.md +65 -8
- package/README.md +4 -4
- package/dist/css/ply-core.css +14 -8
- 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 +14 -8
- package/dist/css/ply.min.css +1 -1
- package/dist/css/styles.css +14 -8
- package/dist/css/styles.min.css +1 -1
- package/llms-full.txt +74 -2
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/ply-classes.json +11 -4
- package/src/scss/components/_buttons.scss +10 -3
- package/src/scss/components/_colors.scss +2 -2
- package/src/scss/components/_grid.scss +1 -0
package/llms-full.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# plycss (ply) — Complete Documentation
|
|
2
2
|
|
|
3
|
-
> ply is a ratio-based, AI-ready CSS framework with built-in dark mode, WCAG 2.1 AA accessibility, and a small footprint (~21KB gzipped).
|
|
3
|
+
> ply is a ratio-based, AI-ready CSS framework with built-in dark mode, WCAG 2.1 AA accessibility, and a small footprint (~21KB gzipped). 458 utility classes, 120+ CSS custom properties, 13 auto-styled semantic elements. No JavaScript. No build step. Install via npm as `plycss` or use the CDN.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -266,6 +266,36 @@ Setting any `data-theme` value prevents auto dark mode from interfering. All 120
|
|
|
266
266
|
|
|
267
267
|
**Important:** If you override colors, verify 4.5:1 contrast for normal text and 3:1 for large text (18px bold / 24px) and UI components (WCAG 1.4.3).
|
|
268
268
|
|
|
269
|
+
### Third-Party Components & Dark Mode
|
|
270
|
+
|
|
271
|
+
When integrating third-party components that don't use `--ply-*` variables, map ply's variables to their styling:
|
|
272
|
+
|
|
273
|
+
```css
|
|
274
|
+
/* Map ply variables to a third-party date picker */
|
|
275
|
+
.third-party-datepicker {
|
|
276
|
+
background: var(--ply-bg-surface);
|
|
277
|
+
color: var(--ply-color-body);
|
|
278
|
+
border-color: var(--ply-border-color);
|
|
279
|
+
}
|
|
280
|
+
.third-party-datepicker .selected {
|
|
281
|
+
background: var(--ply-btn-default-bg);
|
|
282
|
+
color: var(--ply-color-text-inverse);
|
|
283
|
+
}
|
|
284
|
+
.third-party-datepicker .header {
|
|
285
|
+
background: var(--ply-bg-surface-alt);
|
|
286
|
+
color: var(--ply-color-headings);
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Key variables for mapping:
|
|
291
|
+
- Backgrounds: `--ply-bg-body`, `--ply-bg-surface`, `--ply-bg-surface-alt`, `--ply-bg-muted`
|
|
292
|
+
- Text: `--ply-color-body`, `--ply-color-secondary`, `--ply-color-muted`
|
|
293
|
+
- Borders: `--ply-border-color`, `--ply-border-strong`
|
|
294
|
+
- Interactive: `--ply-btn-default-bg`, `--ply-color-link`, `--ply-color-focus`
|
|
295
|
+
- Inverse text: `--ply-color-text-inverse` (white in light, dark in dark)
|
|
296
|
+
|
|
297
|
+
This ensures third-party components follow ply's theme automatically, including dark mode and custom themes.
|
|
298
|
+
|
|
269
299
|
---
|
|
270
300
|
|
|
271
301
|
## Navigation — Semantic and Responsive
|
|
@@ -454,6 +484,48 @@ Outline buttons in input groups automatically match the input border. Button sca
|
|
|
454
484
|
|
|
455
485
|
---
|
|
456
486
|
|
|
487
|
+
## Tables
|
|
488
|
+
|
|
489
|
+
ply auto-styles `<table>` with borders, padding, and readable spacing. No classes needed for a basic table.
|
|
490
|
+
|
|
491
|
+
| Class | Effect |
|
|
492
|
+
|---|---|
|
|
493
|
+
| `table-bordered` | Borders on all cells |
|
|
494
|
+
| `table-stroked` | Bottom borders only |
|
|
495
|
+
| `table-stripped` | Striped odd rows |
|
|
496
|
+
| `table-hovered` | Row highlight on hover |
|
|
497
|
+
| `table-simple` | Remove borders and left padding |
|
|
498
|
+
| `table-flat` | Remove all borders and padding |
|
|
499
|
+
| `table-container` | Responsive horizontal scroll wrapper |
|
|
500
|
+
| `sortable` | Sort arrows on `<th>` (add to individual headers) |
|
|
501
|
+
| `sort-asc` / `sort-desc` | Active sort direction indicator |
|
|
502
|
+
| `table-filter` | Auto-size selects for filter bars |
|
|
503
|
+
| `table-actions` | Right-aligned toolbar above table |
|
|
504
|
+
|
|
505
|
+
```html
|
|
506
|
+
<div class="table-container">
|
|
507
|
+
<table class="table-stripped table-hovered">
|
|
508
|
+
<thead>
|
|
509
|
+
<tr>
|
|
510
|
+
<th class="sortable sort-asc">Name</th>
|
|
511
|
+
<th class="sortable">Email</th>
|
|
512
|
+
<th>Role</th>
|
|
513
|
+
</tr>
|
|
514
|
+
</thead>
|
|
515
|
+
<tbody>
|
|
516
|
+
<tr><td>Jane Doe</td><td>jane@example.com</td><td>Admin</td></tr>
|
|
517
|
+
<tr><td>John Smith</td><td>john@example.com</td><td>Editor</td></tr>
|
|
518
|
+
</tbody>
|
|
519
|
+
</table>
|
|
520
|
+
</div>
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
Tables respond to dark mode automatically — borders, stripe colors, and hover colors adapt via `--ply-color-table-border`, `--ply-color-table-stripped`, and `--ply-color-table-hovered`. Combine classes freely: `table-stripped table-hovered table-bordered` gives striped rows with hover highlights and full borders.
|
|
524
|
+
|
|
525
|
+
Wrap any table in `<div class="table-container">` to get horizontal scrolling on small screens instead of layout overflow.
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
457
529
|
## Alerts and Notifications
|
|
458
530
|
|
|
459
531
|
```html
|
|
@@ -799,7 +871,7 @@ ply is built for AI code generation:
|
|
|
799
871
|
|
|
800
872
|
1. **Single-dash class names** read like English — `units-row`, `equal-height`, `padding`, `border-radius`
|
|
801
873
|
2. **No abbreviation guessing** — `padding-lg` not `pl-6`, `margin-top` not `mt-4`
|
|
802
|
-
3. **
|
|
874
|
+
3. **458 documented classes** in `ply-classes.json` — machine-readable reference
|
|
803
875
|
4. **Semantic HTML first** — auto-styled elements reduce class clutter
|
|
804
876
|
5. **AI-friendly aliases** — `btn-lg`/`btn-big`, `btn-sm`/`btn-small`, `alert`/`tools-alert` all work
|
|
805
877
|
|
package/llms.txt
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# plycss (ply)
|
|
2
2
|
|
|
3
|
-
> ply is a ratio-based, AI-ready CSS framework with dark mode, WCAG 2.1 AA accessibility, and a small footprint (~21KB gzipped).
|
|
3
|
+
> ply is a ratio-based, AI-ready CSS framework with dark mode, WCAG 2.1 AA accessibility, and a small footprint (~21KB gzipped). 458 utility classes, 120+ CSS custom properties, 13 auto-styled semantic elements. No JavaScript. No build step.
|
|
4
4
|
|
|
5
5
|
ply is standalone — do not use Tailwind, Bootstrap, or other CSS frameworks alongside it. Class names are single-dash and human-readable: `btn-primary`, `unit-50`, `padding-lg`, `text-secondary`. Install via npm (`plycss`) or CDN.
|
|
6
6
|
|
|
7
7
|
## Documentation
|
|
8
8
|
|
|
9
9
|
- [Full AI Reference (PLY.md)](https://raw.githubusercontent.com/thatgibbyguy/ply/master/PLY.md): Complete class reference, usage rules, accessibility patterns, keyboard navigation, custom widget ARIA patterns, and code snippets
|
|
10
|
-
- [Machine-Readable Class Map (ply-classes.json)](https://raw.githubusercontent.com/thatgibbyguy/ply/master/ply-classes.json): All
|
|
10
|
+
- [Machine-Readable Class Map (ply-classes.json)](https://raw.githubusercontent.com/thatgibbyguy/ply/master/ply-classes.json): All 458 classes, 120+ CSS custom properties, and 13 semantic elements with descriptions, categories, and examples
|
|
11
11
|
- [VPAT 2.5 Accessibility Conformance](https://raw.githubusercontent.com/thatgibbyguy/ply/master/docs/VPAT.md): Full WCAG 2.1 Level A and AA conformance report
|
|
12
12
|
|
|
13
13
|
## Snippets
|
package/package.json
CHANGED
package/ply-classes.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.6.0",
|
|
3
3
|
"framework": "ply",
|
|
4
4
|
"totalClasses": 457,
|
|
5
5
|
"uniqueClasses": 457,
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"themeTemplate": {
|
|
61
61
|
"description": "Copy-paste starting point for custom themes. Replace placeholder values with your design colors. Every ply component respects these variables.",
|
|
62
|
-
"css": "[data-theme=\"my-theme\"] {\n /* Background */\n --ply-bg-body: #___;\n --ply-bg-surface: #___;\n --ply-bg-surface-alt: #___;\n --ply-bg-muted: #___;\n\n /* Text */\n --ply-color-body: #___;\n --ply-color-headings: #___;\n --ply-color-secondary: #___;\n --ply-color-muted: #___;\n --ply-color-placeholder: #___;\n --ply-color-text-inverse: #___;\n\n /* Borders */\n --ply-border-color: #___;\n --ply-border-strong: #___;\n\n /* Interactive */\n --ply-color-accent: #___;\n --ply-color-focus: #___;\n --ply-color-link-hover: #___;\n\n /* Buttons */\n --ply-btn-default-bg: #___;\n --ply-btn-default-color: #___;\n --ply-btn-default-bg-hover: #___;\n --ply-btn-default-bg-active: #___;\n --ply-btn-secondary-bg: #___;\n --ply-btn-secondary-color: #___;\n --ply-btn-secondary-bg-hover: #___;\n --ply-btn-secondary-bg-active: #___;\n --ply-btn-border-radius: 2rem;\n\n /* Forms */\n --ply-color-input-bg: #___;\n --ply-color-input-border: #___;\n\n /* Navigation */\n --ply-nav-bg: #___;\n --ply-nav-color: #___;\n --ply-nav-border: #___;\n --ply-nav-hover: #___;\n\n /* Code */\n --ply-color-code-bg: #___;\n --ply-color-code-border: #___;\n\n /* Tables */\n --ply-color-table-border: #___;\n --ply-color-table-stripped: #___;\n\n /* Elevation */\n --ply-layer-0: #___;\n --ply-layer-1: #___;\n --ply-layer-2: #___;\n --ply-layer-3: #___;\n --ply-shadow-1: rgba(0, 0, 0, 0.08);\n --ply-shadow-2: rgba(0, 0, 0, 0.1);\n --ply-shadow-3: rgba(0, 0, 0, 0.12);\n\n /* Typography (optional) */\n --ply-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n --ply-font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n --ply-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n}"
|
|
62
|
+
"css": "[data-theme=\"my-theme\"] {\n /* Background */\n --ply-bg-body: #___;\n --ply-bg-surface: #___;\n --ply-bg-surface-alt: #___;\n --ply-bg-muted: #___;\n\n /* Text */\n --ply-color-body: #___;\n --ply-color-headings: #___;\n --ply-color-secondary: #___;\n --ply-color-muted: #___;\n --ply-color-placeholder: #___;\n --ply-color-text-inverse: #___;\n\n /* Borders */\n --ply-border-color: #___;\n --ply-border-strong: #___;\n\n /* Interactive */\n --ply-color-accent: #___;\n --ply-color-focus: #___;\n --ply-color-link-hover: #___;\n\n /* Buttons */\n --ply-btn-default-bg: #___;\n --ply-btn-default-color: #___;\n --ply-btn-default-bg-hover: #___;\n --ply-btn-default-bg-active: #___;\n --ply-btn-secondary-bg: #___;\n --ply-btn-secondary-color: #___;\n --ply-btn-secondary-bg-hover: #___;\n --ply-btn-secondary-bg-active: #___;\n --ply-btn-border-radius: 2rem;\n --ply-btn-font-size: 1em;\n --ply-btn-gap: 0.5em;\n\n /* Forms */\n --ply-color-input-bg: #___;\n --ply-color-input-border: #___;\n\n /* Navigation */\n --ply-nav-bg: #___;\n --ply-nav-color: #___;\n --ply-nav-border: #___;\n --ply-nav-hover: #___;\n\n /* Code */\n --ply-color-code-bg: #___;\n --ply-color-code-border: #___;\n\n /* Tables */\n --ply-color-table-border: #___;\n --ply-color-table-stripped: #___;\n\n /* Elevation */\n --ply-layer-0: #___;\n --ply-layer-1: #___;\n --ply-layer-2: #___;\n --ply-layer-3: #___;\n --ply-shadow-1: rgba(0, 0, 0, 0.08);\n --ply-shadow-2: rgba(0, 0, 0, 0.1);\n --ply-shadow-3: rgba(0, 0, 0, 0.12);\n\n /* Typography (optional) */\n --ply-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n --ply-font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n --ply-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n}"
|
|
63
63
|
},
|
|
64
64
|
"classes": {
|
|
65
65
|
"units-container": {
|
|
@@ -494,7 +494,7 @@
|
|
|
494
494
|
},
|
|
495
495
|
"split": {
|
|
496
496
|
"category": "grid",
|
|
497
|
-
"description": "Remove gap between child units. Applied to units-row.",
|
|
497
|
+
"description": "Remove gap between child units. Applied to units-row. Kept for backwards compatibility — prefer joined.",
|
|
498
498
|
"example": "<div class=\"units-row split\">...</div>"
|
|
499
499
|
},
|
|
500
500
|
"centered-content": {
|
|
@@ -1610,6 +1610,11 @@
|
|
|
1610
1610
|
"description": "Round the outer corners of a btn-group.",
|
|
1611
1611
|
"parent": "btn-group"
|
|
1612
1612
|
},
|
|
1613
|
+
"joined": {
|
|
1614
|
+
"category": "buttons",
|
|
1615
|
+
"description": "Remove gap so children connect as a single visual unit. On btn-group: buttons touch with a 1px divider, connected border-radius on outer edges. On units-row: removes column gutters (alias for split, which is kept for backwards compatibility).",
|
|
1616
|
+
"example": "<div class=\"btn-group joined\"><button class=\"btn\">Left</button><button class=\"btn\">Middle</button><button class=\"btn\">Right</button></div>\n<div class=\"units-row joined\"><div class=\"unit-50\">...</div><div class=\"unit-50\">...</div></div>"
|
|
1617
|
+
},
|
|
1613
1618
|
"unit-role-right": {
|
|
1614
1619
|
"category": "grid",
|
|
1615
1620
|
"description": "Float a grid unit to the right."
|
|
@@ -2487,7 +2492,9 @@
|
|
|
2487
2492
|
"buttons": {
|
|
2488
2493
|
"--ply-btn-default-bg": "Primary button background. Controls btn-primary color and link colors. Light: #0353e9, Dark: #78a9ff. Override in custom themes to change primary + links together.",
|
|
2489
2494
|
"--ply-btn-secondary-bg": "Secondary button background. Controls btn, btn-secondary color. Light: #393939, Dark: #4c4c4c.",
|
|
2490
|
-
"--ply-btn-default-color": "Default button text color. Light: inherits --ply-color-text-inverse (#fff), Dark: #f4f4f4"
|
|
2495
|
+
"--ply-btn-default-color": "Default button text color. Light: inherits --ply-color-text-inverse (#fff), Dark: #f4f4f4",
|
|
2496
|
+
"--ply-btn-font-size": "Button font size. Default: 1em (inherits from context). Override to set a fixed size for all buttons in a theme.",
|
|
2497
|
+
"--ply-btn-gap": "Gap between icon and text inside a button. Default: 0.5em. Applies to all btn variants via inline-flex layout."
|
|
2491
2498
|
},
|
|
2492
2499
|
"navigation": {
|
|
2493
2500
|
"--ply-nav-bg": "Navbar background. Light: #ffffff, Dark: #262626",
|
|
@@ -12,16 +12,18 @@ input[type="reset"].btn,
|
|
|
12
12
|
button.btn {
|
|
13
13
|
transition: all 150ms ease-in-out, transform 50ms ease, background 150ms ease-in-out;
|
|
14
14
|
|
|
15
|
-
display: inline-
|
|
15
|
+
display: inline-flex;
|
|
16
16
|
vertical-align: top;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
gap: var(--ply-btn-gap, 0.5em);
|
|
17
20
|
|
|
18
21
|
font-family: var(--ply-font-body, #{variables.$font-family-controls});
|
|
19
|
-
font-size: 1em;
|
|
22
|
+
font-size: var(--ply-btn-font-size, 1em);
|
|
20
23
|
font-weight: 400;
|
|
21
24
|
|
|
22
25
|
line-height: variables.$base-line;
|
|
23
26
|
|
|
24
|
-
text-align: center;
|
|
25
27
|
text-decoration: none;
|
|
26
28
|
color: var(--ply-btn-secondary-color, var(--ply-color-text-inverse, #fff));
|
|
27
29
|
|
|
@@ -438,6 +440,11 @@ button.btn-white {
|
|
|
438
440
|
}
|
|
439
441
|
}
|
|
440
442
|
|
|
443
|
+
// Joined — no gap between buttons, connected as a single unit
|
|
444
|
+
&.joined {
|
|
445
|
+
gap: 0;
|
|
446
|
+
}
|
|
447
|
+
|
|
441
448
|
&.rounded {
|
|
442
449
|
.btn,
|
|
443
450
|
.input-search {
|
|
@@ -203,9 +203,9 @@ $btn-secondary-dark-active: #bebebe;
|
|
|
203
203
|
--ply-border-strong: #6f6f6f;
|
|
204
204
|
|
|
205
205
|
// Interactive
|
|
206
|
-
--ply-color-link:
|
|
206
|
+
--ply-color-link: #{$btn-primary-dark};
|
|
207
207
|
--ply-color-link-hover: #{$btn-primary-dark-hover};
|
|
208
|
-
--ply-color-link-hover: color-mix(in oklch,
|
|
208
|
+
--ply-color-link-hover: color-mix(in oklch, #{$btn-primary-dark}, white 15%);
|
|
209
209
|
--ply-color-focus: #0f62fe;
|
|
210
210
|
|
|
211
211
|
// Fields
|