@stnd/styles 0.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/CHANGELOG.md +25 -0
- package/README.md +116 -0
- package/TOKENS.md +415 -0
- package/_standard-00-reset.scss +74 -0
- package/_standard-00-variables.scss +54 -0
- package/_standard-01-token.scss +287 -0
- package/_standard-02-color.scss +683 -0
- package/_standard-03-typography.scss +411 -0
- package/_standard-04-grid.scss +314 -0
- package/_standard-05-rhythm.scss +57 -0
- package/_standard-06-prose.scss +289 -0
- package/_standard-07-base.scss +216 -0
- package/_standard-08-media.scss +216 -0
- package/_standard-09-lists.scss +103 -0
- package/_standard-10-tables.scss +49 -0
- package/_standard-11-forms.scss +343 -0
- package/_standard-12-code.scss +204 -0
- package/_standard-13-components.scss +1261 -0
- package/_standard-14-analog.scss +48 -0
- package/_standard-30-contrast.scss +42 -0
- package/_standard-31-print.scss +97 -0
- package/_standard-32-eink.scss +78 -0
- package/_standard-50-utilities.scss +1117 -0
- package/_standard-99-debug.scss +474 -0
- package/dist/obsidian.css +31 -0
- package/dist/obsidian.css.map +1 -0
- package/dist/standard.css +20 -0
- package/dist/standard.css.map +1 -0
- package/index.js +1 -0
- package/obsidian.scss +18 -0
- package/package.json +46 -0
- package/standard.scss +52 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@use "standard-00-variables" as *;
|
|
2
|
+
|
|
3
|
+
#{$stnd-theme-scope} {
|
|
4
|
+
/*
|
|
5
|
+
This data URI is an SVG with a <feTurbulence> filter.
|
|
6
|
+
baseFrequency='0.6' controls the "roughness" (higher = finer grain).
|
|
7
|
+
opacity='0.05' makes it subtle.
|
|
8
|
+
*/
|
|
9
|
+
--effect-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='5' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
|
|
10
|
+
--effect-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.4' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
|
|
11
|
+
--effect-blend-mode: multiply;
|
|
12
|
+
--effect-opacity: 0.15;
|
|
13
|
+
--effect-ink: 0 0 1.12px oklch(from currentColor l c h / 0.1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (prefers-color-scheme: dark) {
|
|
17
|
+
#{$stnd-theme-scope}:not([data-color-mode="light"]) {
|
|
18
|
+
--effect-blend-mode: screen;
|
|
19
|
+
--effect-opacity: 0.05; /* Needs to be stronger to show on dark */
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
#{$stnd-theme-scope}[data-color-mode="dark"] {
|
|
24
|
+
--effect-blend-mode: screen;
|
|
25
|
+
--effect-opacity: 0.05;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* 1. Global Atmosphere (The Desk) */
|
|
29
|
+
html::after,
|
|
30
|
+
.grain::after {
|
|
31
|
+
content: "";
|
|
32
|
+
position: fixed;
|
|
33
|
+
inset: 0;
|
|
34
|
+
z-index: 9999; /* Top layer */
|
|
35
|
+
background-image: var(--effect-grain);
|
|
36
|
+
opacity: var(--effect-opacity);
|
|
37
|
+
mix-blend-mode: var(--effect-blend-mode);
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
background-size: 200px 200px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.prose *,
|
|
43
|
+
.ink *,
|
|
44
|
+
.note * {
|
|
45
|
+
/* filter: contrast(10%);*/
|
|
46
|
+
/* Blurs the edges slightly, then high contrast makes them crisp but organic */
|
|
47
|
+
text-shadow: var(--effect-ink);
|
|
48
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* ===== ACCESSIBILITY SUPPORT ===== */
|
|
2
|
+
/* High contrast mode support */
|
|
3
|
+
@media (prefers-contrast: high), (prefers-contrast: more) {
|
|
4
|
+
#{$stnd-theme-scope} {
|
|
5
|
+
--color-light-foreground: black !important;
|
|
6
|
+
--color-light-background: white !important;
|
|
7
|
+
--color-dark-foreground: white !important;
|
|
8
|
+
--color-dark-background: black !important;
|
|
9
|
+
--color-surface: var(--color-background) !important;
|
|
10
|
+
--color-border: var(--color-foreground) !important;
|
|
11
|
+
--color-muted: var(--color-foreground) !important;
|
|
12
|
+
--color-subtle: var(--color-foreground) !important;
|
|
13
|
+
--shadow: 0 !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
body::before,
|
|
17
|
+
body::after {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Reduced motion + e-ink */
|
|
23
|
+
@media (prefers-reduced-motion: reduce), (update: slow), (monochrome) {
|
|
24
|
+
#{$stnd-theme-scope} {
|
|
25
|
+
--transition: 0s;
|
|
26
|
+
--toast-progress-duration: 0.5s;
|
|
27
|
+
--toast-progress-easing: linear;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
*,
|
|
31
|
+
*::before,
|
|
32
|
+
*::after {
|
|
33
|
+
transition: none !important;
|
|
34
|
+
animation: none !important;
|
|
35
|
+
scroll-behavior: auto !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.toast-progress {
|
|
39
|
+
transition: width var(--toast-progress-duration)
|
|
40
|
+
var(--toast-progress-easing) !important;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@media print {
|
|
2
|
+
#{$stnd-theme-scope} {
|
|
3
|
+
--color-foreground: black;
|
|
4
|
+
--color-background: white;
|
|
5
|
+
--color-surface: white;
|
|
6
|
+
--font-size: 0.925rem !important;
|
|
7
|
+
--optical-ratio: 1.125 !important;
|
|
8
|
+
--line-height: 1.4 !important;
|
|
9
|
+
|
|
10
|
+
--body-padding: var(--space-2);
|
|
11
|
+
--line-width: var(--line-width-full);
|
|
12
|
+
--gap: 0;
|
|
13
|
+
--shadow: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
html {
|
|
17
|
+
|
|
18
|
+
.no-print,
|
|
19
|
+
.no-print * {
|
|
20
|
+
/* Also hide children */
|
|
21
|
+
display: none !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
header,
|
|
25
|
+
footer,
|
|
26
|
+
nav,
|
|
27
|
+
aside {
|
|
28
|
+
display: none !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Reset decorative styles */
|
|
32
|
+
* {
|
|
33
|
+
box-shadow: none !important;
|
|
34
|
+
text-shadow: none !important;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Show link URLs */
|
|
38
|
+
a[href^="http"]::after {
|
|
39
|
+
content: " (" attr(href) ")";
|
|
40
|
+
font-size: 0.8rem;
|
|
41
|
+
color: #666;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
pre,
|
|
45
|
+
blockquote,
|
|
46
|
+
img {
|
|
47
|
+
break-inside: avoid;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
h1,
|
|
51
|
+
h2,
|
|
52
|
+
h3,
|
|
53
|
+
h4,
|
|
54
|
+
h5,
|
|
55
|
+
h6 {
|
|
56
|
+
margin-block: var(--space-2);
|
|
57
|
+
/* Remove !important */
|
|
58
|
+
break-after: avoid;
|
|
59
|
+
/* Keep with following content */
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
hr {
|
|
63
|
+
margin-block: var(--space);
|
|
64
|
+
/* Remove !important */
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
html::before,
|
|
68
|
+
html::after,
|
|
69
|
+
body::before,
|
|
70
|
+
body::after {
|
|
71
|
+
display: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
body {
|
|
75
|
+
border: 0 !important;
|
|
76
|
+
background: transparent !important;
|
|
77
|
+
max-width: 100% !important;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Optimize for paper */
|
|
82
|
+
@page {
|
|
83
|
+
margin-top: 1.5cm;
|
|
84
|
+
margin-right: 1cm;
|
|
85
|
+
margin-bottom: 1.5cm;
|
|
86
|
+
margin-left: 1cm;
|
|
87
|
+
/*
|
|
88
|
+
@top-center {
|
|
89
|
+
content: "Document Title";
|
|
90
|
+
}
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
@bottom-right {
|
|
94
|
+
content: counter(page);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@media screen and (update: slow), (monochrome) {
|
|
2
|
+
#{$stnd-theme-scope} {
|
|
3
|
+
/* Force absolute contrast */
|
|
4
|
+
--color-foreground: black !important;
|
|
5
|
+
--color-background: white !important;
|
|
6
|
+
--color-accent: black !important; /* No orange on B&W screens */
|
|
7
|
+
--color-border: black !important;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
body::before,
|
|
11
|
+
body::after {
|
|
12
|
+
display: none !important;
|
|
13
|
+
}
|
|
14
|
+
body * {
|
|
15
|
+
text-shadow: none !important;
|
|
16
|
+
background-blend-mode: normal !important;
|
|
17
|
+
filter: none !important;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
body,
|
|
21
|
+
.markdown-preview-view,
|
|
22
|
+
.cm-scroller {
|
|
23
|
+
scroll-behavior: auto !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* 2. Kill all motion */
|
|
27
|
+
*,
|
|
28
|
+
*::before,
|
|
29
|
+
*::after {
|
|
30
|
+
transition: none !important;
|
|
31
|
+
animation: none !important;
|
|
32
|
+
scroll-behavior: auto !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* 3. Replace Shadows with Borders */
|
|
36
|
+
/* Shadows look like dirty smudges on e-ink */
|
|
37
|
+
.card,
|
|
38
|
+
.button,
|
|
39
|
+
.image {
|
|
40
|
+
box-shadow: none !important;
|
|
41
|
+
border: 2px solid black !important;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* 4. Thicken Typography */
|
|
45
|
+
/* E-ink anti-aliasing can make thin fonts disappear */
|
|
46
|
+
body {
|
|
47
|
+
-webkit-font-smoothing: none; /* Crisper text */
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
h1,
|
|
51
|
+
h2,
|
|
52
|
+
h3,
|
|
53
|
+
h4,
|
|
54
|
+
h5,
|
|
55
|
+
h6 {
|
|
56
|
+
font-weight: 900 !important; /* Force heavy headers */
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* 5. Image Dithering Logic */
|
|
60
|
+
img {
|
|
61
|
+
filter: grayscale(100%) contrast(120%);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Stop caret blinking */
|
|
65
|
+
.cm-cursor {
|
|
66
|
+
animation-play-state: paused !important;
|
|
67
|
+
animation: none !important; /* disables blinking animation */
|
|
68
|
+
background-color: var(
|
|
69
|
+
--text-accent
|
|
70
|
+
) !important; /* optional: keeps caret visible */
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* 6. Background Glass Override */
|
|
74
|
+
.bg-glass {
|
|
75
|
+
backdrop-filter: none !important;
|
|
76
|
+
background: var(--color-background) !important;
|
|
77
|
+
}
|
|
78
|
+
}
|