@stnd/styles 0.5.2 → 0.5.3

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.
@@ -1,5 +1,24 @@
1
1
  @use "standard-00-variables" as *;
2
2
 
3
+ /**
4
+ * @component Components & Buttons
5
+ * @category Components
6
+ * @description Interactive buttons, button groups, loaders, and keycaps.
7
+ * Buttons extend `%surface` and `%padding-text`, providing tactile hover states,
8
+ * focus outlines, and active feedback.
9
+ *
10
+ * @property button Zero-class interactive button element.
11
+ * @property a.btn Anchor styled identically to a button.
12
+ * @property .btn-primary Primary action button filled with accent color.
13
+ * @property .btn-secondary Secondary button with subtle surface background.
14
+ * @property .btn-outline Outlined button with hairline border.
15
+ * @property .btn-destructive Destructive action button using error red.
16
+ * @property .btn-ghost Ghost button transparent until hover.
17
+ * @property .btn-icon Square icon action button.
18
+ * @property .btn-group Segmented inline button group with shared borders.
19
+ * @property .loader Rotating circular spinner with accent glow.
20
+ */
21
+
3
22
  /* =========================== */
4
23
  /* BUTTONS */
5
24
  /* =========================== */
@@ -33,19 +52,6 @@
33
52
  }
34
53
  }
35
54
 
36
- kbd {
37
- background-color: var(--color-surface);
38
- background-image: var(--effect-grain);
39
- border: none;
40
- border-radius: var(--radius);
41
- /* Button-like raised effect */
42
- box-shadow: var(--shadow-raised);
43
- padding: var(--space-d6) var(--space-d3);
44
- font-family: var(--font-monospace);
45
- font-size: var(--size-xs);
46
- pointer-events: none;
47
- }
48
-
49
55
  $types: "secondary", "outline", "destructive", "ghost", "icon";
50
56
 
51
57
  :where(button),
@@ -339,6 +345,17 @@ a.badge.secondary:hover,
339
345
  }
340
346
  }
341
347
 
348
+ /**
349
+ * @name Alert Banners
350
+ * @group components-feedback
351
+ * @description Contextual feedback notifications with status colors and left accent borders.
352
+ *
353
+ * @property .alert Container banner using interface typography and status tinting.
354
+ * @property .alert.success Success alert themed with green status color.
355
+ * @property .alert.warning Warning alert themed with orange status color.
356
+ * @property .alert.error Error alert themed with red status color.
357
+ * @property .alert.info Informational alert themed with blue status color.
358
+ */
342
359
  .alert {
343
360
  font-family: var(--font-interface);
344
361
  --color-alert: var(--color-accent);
@@ -408,6 +425,13 @@ a.badge.secondary:hover,
408
425
  * - Dark mode shadow adjustments for better depth perception
409
426
  * - Optional card image hero with object-fit controls
410
427
  *
428
+ * @property .card Structured container with surface elevation, hairline borders, and rhythm padding.
429
+ * @property .card-header Header area for card title and metadata.
430
+ * @property .card-body Main content body with automatic vertical rhythm.
431
+ * @property .card-footer Bottom action bar for links and buttons.
432
+ * @property .card.clickable Interactive clickable card variant with hover lift.
433
+ * @property .card-grid Responsive grid container specifically designed for card multiples.
434
+ *
411
435
  * @see {class} .grid - Often used to layout multiple cards in columns
412
436
  * @see {variable} --base - Controls internal spacing rhythm
413
437
  * @see {class} .prose - Can be used inside card-body for rich content
@@ -496,9 +520,6 @@ a.badge.secondary:hover,
496
520
  background-color: var(--color-surface);
497
521
  transition: all var(--transition);
498
522
  border-radius: var(--radius);
499
- /* --border currently resolves to `none` everywhere in this file
500
- (card, card header/footer, .comment, .comment-content) — see the
501
- AUDIT FLAG in _standard-02-color.scss. */
502
523
  border: var(--border);
503
524
 
504
525
  &.hero {
@@ -599,6 +620,16 @@ card.inset {
599
620
  box-shadow: inset var(--shadow) !important;
600
621
  }
601
622
 
623
+ /**
624
+ * @name Callout Blocks
625
+ * @group components-layout
626
+ * @description Obsidian-style callout boxes with icons, titles, and collapsible folding.
627
+ *
628
+ * @property .callout Container callout card with raised shadow and ring border.
629
+ * @property .callout-title Header title for callout.
630
+ * @property .callout-content Body content within callout.
631
+ * @property details.callout Collapsible fold callout using native HTML details.
632
+ */
602
633
  .callout {
603
634
  /* Raised effect for callout cards */
604
635
  box-shadow: var(--shadow-raised), var(--shadow-ring);
@@ -799,7 +830,7 @@ details .callout-fold {
799
830
  }
800
831
 
801
832
  // Caption Callout (after an image)
802
- p:has(img) + .callout[data-callout="caption" i] {
833
+ .callout[data-callout="caption"] {
803
834
  padding: 0;
804
835
  background: none;
805
836
  padding-block-start: var(--gap);
@@ -815,10 +846,10 @@ p:has(img) + .callout[data-callout="caption" i] {
815
846
  padding: 0;
816
847
  background: none;
817
848
  color: var(--color-muted);
818
- border: none;
849
+ border: none !important;
819
850
 
820
851
  box-shadow: none;
821
- text-align: center;
852
+ text-align: center !important;
822
853
  text-wrap: balance;
823
854
  }
824
855
  }
@@ -847,8 +878,14 @@ details .callout-fold {
847
878
 
848
879
  /**
849
880
  * @name Comments
850
- * @group comments
881
+ * @group components
851
882
  * @since 0.11.0
883
+ * @description Threaded discussion list with author names, timestamps, and quotes.
884
+ *
885
+ * @property #comments Root comments container.
886
+ * @property .comment Single comment card with surface background and elevation.
887
+ * @property .comment-header Author, date, and status metadata bar.
888
+ * @property .comment-content Indented comment message body.
852
889
  */
853
890
 
854
891
  #comments {
@@ -910,6 +947,8 @@ details .callout-fold {
910
947
  *
911
948
  * Actions within alerts (links, buttons) should be visually distinct but not
912
949
  * overwhelming. This provides subtle styling that inherits the alert's color.
950
+ *
951
+ * @property .alert-action Inline action link within an alert, inheriting `--color-alert`.
913
952
  */
914
953
  /* Fixed 2026-07-14 — was an undefined token (--alert-border-color),
915
954
  corrected to the real --color-alert, matching the docblock's stated
@@ -1,5 +1,24 @@
1
1
  @use "standard-00-variables" as *;
2
2
 
3
+ /**
4
+ * @component Analog
5
+ * @category Effects
6
+ * @description The "analog atmosphere" layer: a fixed, full-viewport grain
7
+ * texture painted over every page with zero markup (`html::after`), plus a
8
+ * subtle ink-bleed text-shadow for text inside `.prose`/`.ink`/`.note`
9
+ * containers. Grain intensity and blend mode swap automatically in dark
10
+ * mode.
11
+ *
12
+ * @property .grain Applies grain overlay to a specific subtree container.
13
+ * @property --effect-grain Coarse noise texture SVG filter data URI used by page-wide overlay.
14
+ * @property --effect-noise Fine noise texture SVG filter data URI for high-density grain.
15
+ * @property --effect-opacity Overlay opacity (0.15 in light mode, 0.05 in dark mode).
16
+ * @property --effect-blend-mode Overlay blend mode (`multiply` in light mode, `screen` in dark).
17
+ * @property --effect-ink Subtle ink-bleed text-shadow applied to typography.
18
+ * @property .ink Container applying organic ink-bleed text-shadows to descendants.
19
+ * @property .note Note container applying ink-bleed text-shadows to content.
20
+ */
21
+
3
22
  #{$stnd-theme-scope} {
4
23
  /*
5
24
  This data URI is an SVG with a <feTurbulence> filter.
@@ -27,7 +46,7 @@
27
46
 
28
47
  #{$stnd-theme-scope}[data-color-mode="dark"] {
29
48
  --effect-blend-mode: screen;
30
- --effect-opacity: 0.05;
49
+ --effect-opacity: 0.025;
31
50
  }
32
51
 
33
52
  /* 1. Global Atmosphere (The Desk) */
@@ -1,5 +1,19 @@
1
1
  @use "standard-00-variables" as *;
2
2
 
3
+ /**
4
+ * @component Accessibility Preferences
5
+ * @category Effects
6
+ * @description Responds to OS-level accessibility preferences with zero
7
+ * markup or opt-in classes: `prefers-contrast: high/more` slams every color
8
+ * token to pure black/white and hides the decorative grain texture;
9
+ * `prefers-reduced-motion: reduce` (also `update: slow` / `monochrome`,
10
+ * @property --color-surface Surface token forced to match background in high-contrast mode.
11
+ * @property --color-border Border token forced to pure foreground color.
12
+ * @property --color-muted Muted text token forced to pure foreground color.
13
+ * @property --shadow Shadow elevation disabled (`0`) to eliminate low-contrast blur.
14
+ * @property --transition Transition duration forced to `0s` under reduced-motion preferences.
15
+ */
16
+
3
17
  /* ===== ACCESSIBILITY SUPPORT ===== */
4
18
  /* High contrast mode support */
5
19
  @media (prefers-contrast: high), (prefers-contrast: more) {
@@ -29,8 +43,6 @@
29
43
  @media (prefers-reduced-motion: reduce), (update: slow), (monochrome) {
30
44
  #{$stnd-theme-scope} {
31
45
  --transition: 0s;
32
- --toast-progress-duration: 0.5s;
33
- --toast-progress-easing: linear;
34
46
  }
35
47
 
36
48
  *,
@@ -40,14 +52,4 @@
40
52
  animation: none !important;
41
53
  scroll-behavior: auto !important;
42
54
  }
43
-
44
- /* Deliberate exception to the blanket transition:none above (wins via
45
- higher specificity — .toast-progress beats the universal *). A toast's
46
- countdown bar is functional motion (communicates time remaining), not
47
- decorative, so it's exempted rather than disabled — just slowed to a
48
- flat --toast-progress-duration instead of stopped outright. */
49
- .toast-progress {
50
- transition: width var(--toast-progress-duration)
51
- var(--toast-progress-easing) !important;
52
- }
53
55
  }
@@ -1,5 +1,24 @@
1
1
  @use "standard-00-variables" as *;
2
2
 
3
+ /**
4
+ * @component Print
5
+ * @category Effects
6
+ * @description The `@media print` stylesheet: forces black-on-white tokens,
7
+ * shrinks type and tightens spacing for paper, hides site chrome
8
+ * (`header`/`footer`/`nav`/`aside`) and the analog grain overlay, strips
9
+ * decorative shadows, expands external links into visible URL text, and
10
+ * adds page-break protection plus `@page` margins with a page counter.
11
+ *
12
+ * @property .no-print Hides the element and all its descendants only when printing.
13
+ * @property --color-foreground Forced to pure black for high print legibility.
14
+ * @property --color-background Forced to pure white for paper ink conservation.
15
+ * @property --font-size Adjusted root font size for printed text (`0.925rem`).
16
+ * @property --line-height Tightened line height for print reading (`1.4`).
17
+ *
18
+ * @example html - Hide something from the printed page
19
+ * <button class="no-print">Share</button>
20
+ */
21
+
3
22
  @media print {
4
23
  #{$stnd-theme-scope} {
5
24
  --color-foreground: black;
@@ -2,6 +2,21 @@
2
2
  other file in the package. */
3
3
  @use "standard-00-variables" as *;
4
4
 
5
+ /**
6
+ * @component E-ink
7
+ * @category Effects
8
+ * @description The e-ink / monochrome-display layer (`update: slow` or
9
+ * `monochrome`): forces absolute black-and-white, removes all motion,
10
+ * shadows, filters and text-shadows, replaces shadows with hard 2px black
11
+ * borders, thickens headings to weight 900, and dithers images to
12
+ * high-contrast grayscale. Zero markup or opt-in classes required.
13
+ *
14
+ * @property --color-accent Forced to black — no chromatic accents on black-and-white screens.
15
+ * @property --color-foreground Forced to pure black.
16
+ * @property --color-background Forced to pure white.
17
+ * @property --color-border Forced to solid black, replacing fuzzy shadows with sharp contrast.
18
+ */
19
+
5
20
  @media screen and (update: slow), (monochrome) {
6
21
  #{$stnd-theme-scope} {
7
22
  /* Force absolute contrast */
@@ -3,8 +3,19 @@
3
3
  /**
4
4
  * @component Utility Classes
5
5
  * @category Utilities
6
- * @description Hybrid utility system supporting both Industrial T-shirt sizes
7
- * and Mathematical units (1-12).
6
+ * @description Hybrid utility system supporting both Industrial T-shirt sizes (3xs..6xl)
7
+ * and Mathematical rhythm units (1-12, half, trim, leading).
8
+ *
9
+ * @property .p-*, .pt-*, .pb-*, .pl-*, .pr-*, .px-*, .py-* Padding scale utilities.
10
+ * @property .m-*, .mt-*, .mb-*, .ml-*, .mr-*, .mx-*, .my-* Margin scale utilities.
11
+ * @property .gap-*, .gap-x-*, .gap-y-* Grid and flex gap utilities.
12
+ * @property .w-*, .h-*, .max-w-*, .min-w-*, .max-h-*, .min-h-* Sizing scale utilities.
13
+ * @property .text-muted, .text-subtle, .text-accent Foreground text color utilities.
14
+ * @property .bg-surface, .bg-background Background color utilities.
15
+ * @property .border, .border-accent, .border-transparent Border stroke utilities.
16
+ * @property .rounded, .rounded-sm, .rounded-lg, .rounded-full Border radius utilities.
17
+ * @property .shadow, .shadow-sm, .shadow-md, .shadow-lg, .shadow-xl Elevation shadow utilities.
18
+ * @property .flex, .inline-flex, .grid, .inline-grid, .block, .inline-block, .hidden Layout display utilities.
8
19
  */
9
20
 
10
21
  /* ============================================================ */
@@ -798,9 +809,6 @@
798
809
  border: 0 !important;
799
810
  }
800
811
 
801
- /* --border currently resolves to `none` — see the AUDIT FLAG in
802
- _standard-02-color.scss. Affects .border/.border-accent/.border-t/-b/
803
- -l/-r below too. */
804
812
  .border {
805
813
  border: var(--border) !important;
806
814
  }
@@ -918,8 +926,6 @@
918
926
  page-break-inside: avoid;
919
927
  }
920
928
 
921
- /* --border currently resolves to `none` — see the AUDIT FLAG in
922
- _standard-02-color.scss. */
923
929
  .columns-rule {
924
930
  column-rule: var(--border);
925
931
  }
@@ -9,13 +9,16 @@
9
9
  * baseline rhythm, reading layout zones, and other layout metrics. Essential for
10
10
  * design system development and layout debugging. Automatically hidden in print.
11
11
  *
12
- * @prop {class} .stnd-debug Enable debug visualization
13
- * @prop {overlay} baseline-grid Horizontal baseline grid overlay
14
- * @prop {overlay} grid-columns Vertical grid column overlay
15
- * @prop {overlay} reading-zones Reading layout zone visualization
16
- * @prop {overlay} rhythm-spacing Margin/spacing outline visualization
17
- * @prop {indicator} breakpoint-indicator Current responsive breakpoint
18
- * @prop {indicator} debug-panel Fixed info panel with metrics
12
+ * @property .stnd-debug Enable debug visualization overlays on the page or container.
13
+ * @property .debug-baseline-grid Horizontal baseline rhythm grid overlay.
14
+ * @property .debug-grid-columns Vertical grid column guidelines overlay.
15
+ * @property .debug-reading-zones Reading layout column boundary highlights.
16
+ * @property .debug-rhythm-spacing Margin and padding bounding box visualizer.
17
+ * @property .debug-breakpoint-indicator Viewport responsive breakpoint tag indicator.
18
+ * @property .debug-panel Fixed status panel reporting active layout metrics.
19
+ * @property --stnd-lab-bg Debug HUD background color.
20
+ * @property --stnd-lab-text Debug HUD text color.
21
+ * @property --stnd-lab-accent Debug HUD accent highlight color.
19
22
  *
20
23
  * @example
21
24
  * // Enable debug mode on page
package/obsidian.scss CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * This entry point is specifically for the Obsidian plugin.
5
5
  * It ONLY includes the core CSS variables (tokens, colors) scoped to
6
- * body.stnd-theme (not :root — Obsidian's window is shared with other
6
+ * body.stnd-adapter (not :root — Obsidian's window is shared with other
7
7
  * themes/plugins, so tokens are namespaced rather than declared globally),
8
8
  * without including any of the global element resets (*, html, body)
9
9
  * or layout/typography element selectors that would destroy Obsidian's UI.
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
  @use "standard-00-variables" as * with (
16
- $stnd-theme-scope: "body.stnd-theme"
16
+ $stnd-theme-scope: "body.stnd-adapter"
17
17
  );
18
18
  @use "standard-01-token";
19
19
  @use "standard-02-color";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stnd/styles",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "type": "module",
5
5
  "author": "Francis Fontaine",
6
6
  "license": "MIT",
@@ -34,9 +34,6 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "dependencies": {
38
- "wrangler": "^4.105.0"
39
- },
40
37
  "devDependencies": {
41
38
  "sass": "^1.70.0"
42
39
  },
package/standard.scss CHANGED
@@ -1,9 +1,8 @@
1
1
  /*!
2
- * Standard Design — Fine-Art Typography Framework
3
- *
4
- * Classical design principles, mathematical precision with the golden ratio,
5
- * and micro-typography rules inspired by the masters of print design.
6
- * Built to be themable. Zero runtime dependencies.
2
+ * @component Introduction
3
+ * @category Overview
4
+ * @description Fine-art typography framework combining classical European design principles,
5
+ * mathematical precision with the golden ratio, and modern relative-color syntax.
7
6
  *
8
7
  * Based on research from:
9
8
  * - The Elements of Typographic Style (Robert Bringhurst)
@@ -14,6 +13,13 @@
14
13
  *
15
14
  * Philosophy: Respect classic typography rules, but readability always wins.
16
15
  *
16
+ * @property Foundation Layer Reset, variables, design tokens, OKLCH color engine, and typography system.
17
+ * @property Layout Layer 12-column Swiss grid, vertical rhythm engine, and fluid prose layouts.
18
+ * @property Elements Layer Base document root, responsive media/lightbox, styled lists, tables, forms, and syntax highlighting.
19
+ * @property Components Layer Button hierarchy, elevated cards, callouts, alerts, and analog atmospheric grain.
20
+ * @property Modes Layer High contrast accessibility, print stylesheets, and e-ink display adaptation.
21
+ * @property Utilities Layer T-shirt and mathematical scale utilities, and layout debugging overlays.
22
+ *
17
23
  * @version @VERSION_PLACEHOLDER@
18
24
  * @license MIT
19
25
  * @package @stnd/styles