@codecavepro/brand 3.3.0 → 3.4.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/README.md +20 -11
- package/dist/colors_and_type.css +42 -6
- package/dist/fonts.css +20 -4
- package/dist/theme.css +1 -1
- package/dist/tokens/typography.d.ts +3 -2
- package/dist/tokens/typography.d.ts.map +1 -1
- package/dist/tokens/typography.js +3 -2
- package/dist/tokens.css +5 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ redesign turns into a find-and-replace across your codebase.
|
|
|
45
45
|
|
|
46
46
|
### Already have your own base styles? Import the values only
|
|
47
47
|
|
|
48
|
-
`@codecavepro/brand/css` is the design system **whole**: the tokens,
|
|
48
|
+
`@codecavepro/brand/css` is the design system **whole**: the tokens, eleven `@font-face`
|
|
49
49
|
rules, base rules for `html`, `body`, `h1`–`h6` and `a`, two layout primitives and
|
|
50
50
|
around sixty component classes. That is what you want for a page that should look like
|
|
51
51
|
CODECAVE. It is _not_ what you want in an app that already has a base layer — dropping
|
|
@@ -60,8 +60,8 @@ else:
|
|
|
60
60
|
|
|
61
61
|
Same 103 properties on `:root`, same values, zero rules. Nothing it declares can change
|
|
62
62
|
how a single existing element renders — a `var()` only takes effect where you write
|
|
63
|
-
one. Fonts come with it only as a _name_: `--font-sans` says Satoshi,
|
|
64
|
-
faces stays your call (see below).
|
|
63
|
+
one. Fonts come with it only as a _name_: `--font-sans` says Satoshi, then Manrope for
|
|
64
|
+
the Cyrillic Satoshi lacks, and declaring the faces stays your call (see below).
|
|
65
65
|
|
|
66
66
|
Use it to end a duplicated palette without signing up for a redesign in the same commit.
|
|
67
67
|
|
|
@@ -78,8 +78,8 @@ file at that URL are provably the same bytes.
|
|
|
78
78
|
|
|
79
79
|
## Fonts: this package ships none
|
|
80
80
|
|
|
81
|
-
`@codecavepro/brand/css` declares
|
|
82
|
-
binaries are included** — that is a licensing question, not an oversight. Until you
|
|
81
|
+
`@codecavepro/brand/css` declares eleven `@font-face` rules, ten for **Satoshi** and one
|
|
82
|
+
for **Manrope**, but **no font binaries are included** — that is a licensing question, not an oversight. Until you
|
|
83
83
|
supply the files, the faces 404 and the browser falls back down the stack
|
|
84
84
|
(`-apple-system`, `Segoe UI`, Roboto, …). Tokens, colours and the type _scale_ are all
|
|
85
85
|
correct regardless; only the typeface is missing.
|
|
@@ -87,14 +87,15 @@ correct regardless; only the typeface is missing.
|
|
|
87
87
|
The two stylesheets expect the files in **different places**, because one is meant to be
|
|
88
88
|
dropped into a project on its own:
|
|
89
89
|
|
|
90
|
-
| Import | `@font-face` URLs
|
|
91
|
-
| ------------------------------- |
|
|
92
|
-
| `@codecavepro/brand/css` | `./fonts/Satoshi-*.woff2`
|
|
93
|
-
| `@codecavepro/brand/fonts.css` | `./Satoshi-*.woff2`
|
|
94
|
-
| `@codecavepro/brand/tokens.css` | _none — it declares no faces_
|
|
90
|
+
| Import | `@font-face` URLs | Put the `.woff2`/`.woff` files at |
|
|
91
|
+
| ------------------------------- | ---------------------------------------------------------- | ---------------------------------------------- |
|
|
92
|
+
| `@codecavepro/brand/css` | `./fonts/Satoshi-*.woff2`, `./fonts/Manrope-Cyrillic.woff2` | a `fonts/` directory **beside** the stylesheet |
|
|
93
|
+
| `@codecavepro/brand/fonts.css` | `./Satoshi-*.woff2`, `./Manrope-Cyrillic.woff2` | **beside** the stylesheet itself |
|
|
94
|
+
| `@codecavepro/brand/tokens.css` | _none — it declares no faces_ | wherever your own `@font-face` rules point |
|
|
95
95
|
|
|
96
96
|
Get the cuts from [Fontshare](https://www.fontshare.com/fonts/satoshi) — 300, 400, 500,
|
|
97
|
-
700 and 900, each upright and italic, which is the ten faces these stylesheets
|
|
97
|
+
700 and 900, each upright and italic, which is the ten Satoshi faces these stylesheets
|
|
98
|
+
declare.
|
|
98
99
|
Bind each with a real `font-weight` descriptor rather than letting the browser
|
|
99
100
|
synthesize; the design system documents why in
|
|
100
101
|
[DESIGN.md §10.3](https://github.com/CodeCavePro/brand/blob/development/DESIGN.md#103-synthesized-vs-real-font-weights).
|
|
@@ -105,6 +106,14 @@ collide into two slots and whichever is declared last silently wins — your `90
|
|
|
105
106
|
renders Bold, or your `700` renders Black, with nothing to indicate which. Take the
|
|
106
107
|
binaries from that download and the declarations from here.
|
|
107
108
|
|
|
109
|
+
**Satoshi has no Cyrillic, so Manrope sets it.** `--font-sans` names Manrope second, and
|
|
110
|
+
its one face covers only the Cyrillic block, so Satoshi keeps every Latin letter, digit
|
|
111
|
+
and punctuation mark, and a page with no Cyrillic never downloads the file. It is Google
|
|
112
|
+
Fonts' Cyrillic subset of the variable font, weights 300 to 800, in
|
|
113
|
+
[`src/styles/fonts/`](https://github.com/CodeCavePro/brand/tree/development/src/styles/fonts)
|
|
114
|
+
as `Manrope-Cyrillic.woff2`. Manrope is under the SIL Open Font License, so ship
|
|
115
|
+
`Manrope-OFL.txt` from the same folder beside it.
|
|
116
|
+
|
|
108
117
|
## The typed module
|
|
109
118
|
|
|
110
119
|
For consumers that cannot read a stylesheet — design tooling, canvas/WebGL renderers,
|
package/dist/colors_and_type.css
CHANGED
|
@@ -19,11 +19,12 @@
|
|
|
19
19
|
/* ---------------------------------------------------------------------------
|
|
20
20
|
* Font faces
|
|
21
21
|
*
|
|
22
|
-
* The ten faces are bound to explicit numeric weights in both styles.
|
|
23
|
-
* vendor's own stylesheet.css declares Bold and Black as the same
|
|
22
|
+
* The ten Satoshi faces are bound to explicit numeric weights in both styles.
|
|
23
|
+
* The vendor's own stylesheet.css declares Bold and Black as the same
|
|
24
24
|
* `font-weight: bold`, and their italics likewise, so four cuts collide into
|
|
25
25
|
* two slots there and the last one declared silently wins. That is the defect
|
|
26
26
|
* these declarations exist to avoid; do not replace them with the vendor file.
|
|
27
|
+
* An eleventh face, Manrope, follows them and sets the Cyrillic Satoshi lacks.
|
|
27
28
|
* ------------------------------------------------------------------------ */
|
|
28
29
|
|
|
29
30
|
@font-face {
|
|
@@ -116,6 +117,40 @@
|
|
|
116
117
|
font-display: swap;
|
|
117
118
|
}
|
|
118
119
|
|
|
120
|
+
/* ---------------------------------------------------------------------------
|
|
121
|
+
* Cyrillic: Manrope
|
|
122
|
+
*
|
|
123
|
+
* Satoshi has no Cyrillic, in these files or in Fontshare's current release,
|
|
124
|
+
* whose own page lists 135 languages, all written in Latin letters. Russian
|
|
125
|
+
* text used to fall through to the system fonts. Manrope sets it now:
|
|
126
|
+
* --font-sans names it second, so Satoshi keeps every Latin letter, digit and
|
|
127
|
+
* punctuation mark, and Manrope draws only the Cyrillic that Satoshi lacks.
|
|
128
|
+
*
|
|
129
|
+
* It is a family of its own, not more faces under the name Satoshi, because
|
|
130
|
+
* of emphasis. Font matching narrows a family to its italic faces for <em>
|
|
131
|
+
* before it reads unicode-range, so a Cyrillic face inside Satoshi would
|
|
132
|
+
* either never match emphasised text or match it upright. A separate family
|
|
133
|
+
* with one upright face is slanted by the browser instead.
|
|
134
|
+
*
|
|
135
|
+
* One variable file covers weights 300 to 800, and a 900 request gets 800.
|
|
136
|
+
* It is Google Fonts' Cyrillic subset under the SIL Open Font License
|
|
137
|
+
* (fonts/Manrope-OFL.txt), and the unicode-range is the subset's own, so a
|
|
138
|
+
* page without Cyrillic never downloads it.
|
|
139
|
+
*
|
|
140
|
+
* size-adjust: both faces draw capitals 72 units tall at 100px, but Manrope's
|
|
141
|
+
* small letters stand 54 to Satoshi's 49 and it sets about 8% wider. At 95%
|
|
142
|
+
* the two are within about 5% on each of those measures.
|
|
143
|
+
* ------------------------------------------------------------------------ */
|
|
144
|
+
@font-face {
|
|
145
|
+
font-family: Manrope;
|
|
146
|
+
src: url("./fonts/Manrope-Cyrillic.woff2") format("woff2");
|
|
147
|
+
font-weight: 300 800;
|
|
148
|
+
font-style: normal;
|
|
149
|
+
font-display: swap;
|
|
150
|
+
size-adjust: 95%;
|
|
151
|
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
152
|
+
}
|
|
153
|
+
|
|
119
154
|
:root {
|
|
120
155
|
/* =========================================================================
|
|
121
156
|
* RAW RAMPS — verbatim from global.css :root after the 2026 palette
|
|
@@ -210,11 +245,12 @@
|
|
|
210
245
|
|
|
211
246
|
/* =========================================================================
|
|
212
247
|
* TYPOGRAPHY
|
|
213
|
-
* One family
|
|
214
|
-
*
|
|
248
|
+
* One family, and Manrope for the Cyrillic it lacks (see "Cyrillic" above).
|
|
249
|
+
* Named heading sizes come from the production @theme block; the remaining
|
|
250
|
+
* steps are measured from the live site.
|
|
215
251
|
* ====================================================================== */
|
|
216
|
-
--font-sans: Satoshi, -apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
217
|
-
"Helvetica Neue", "Noto Sans", Arial, sans-serif;
|
|
252
|
+
--font-sans: Satoshi, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
253
|
+
Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
|
|
218
254
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
219
255
|
"Liberation Mono", "Courier New", monospace;
|
|
220
256
|
|
package/dist/fonts.css
CHANGED
|
@@ -8,13 +8,19 @@
|
|
|
8
8
|
* The vendor's own stylesheet.css cannot be used: it declares Bold and Black
|
|
9
9
|
* BOTH as `font-weight: bold`, and their italics likewise, so four cuts
|
|
10
10
|
* collide into two slots and whichever is declared last silently wins. The
|
|
11
|
-
* ten faces below bind 300/400/500/700/900 in each style explicitly,
|
|
12
|
-
* the whole point of shipping real cuts rather than letting a
|
|
13
|
-
* synthesize them.
|
|
11
|
+
* ten Satoshi faces below bind 300/400/500/700/900 in each style explicitly,
|
|
12
|
+
* which is the whole point of shipping real cuts rather than letting a
|
|
13
|
+
* browser synthesize them.
|
|
14
|
+
*
|
|
15
|
+
* CYRILLIC
|
|
16
|
+
* Satoshi has none. The eleventh face, Manrope, sets it: --font-sans names it
|
|
17
|
+
* second, and its unicode-range limits it to the Cyrillic block. Why it is a
|
|
18
|
+
* family of its own and why it is 95% size is in colors_and_type.css.
|
|
14
19
|
*
|
|
15
20
|
* The binaries are not in the npm package -- see the note in
|
|
16
21
|
* packages/brand/scripts/build.mjs -- so a consumer supplies the files and
|
|
17
|
-
* these
|
|
22
|
+
* these eleven declarations tell it what to supply. Manrope-OFL.txt is the
|
|
23
|
+
* licence that travels with Manrope-Cyrillic.woff2.
|
|
18
24
|
*/
|
|
19
25
|
|
|
20
26
|
@font-face {
|
|
@@ -106,3 +112,13 @@
|
|
|
106
112
|
font-style: italic;
|
|
107
113
|
font-display: swap;
|
|
108
114
|
}
|
|
115
|
+
|
|
116
|
+
@font-face {
|
|
117
|
+
font-family: Manrope;
|
|
118
|
+
src: url("./Manrope-Cyrillic.woff2") format("woff2");
|
|
119
|
+
font-weight: 300 800;
|
|
120
|
+
font-style: normal;
|
|
121
|
+
font-display: swap;
|
|
122
|
+
size-adjust: 95%;
|
|
123
|
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
124
|
+
}
|
package/dist/theme.css
CHANGED
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
* come from the production `@theme` block; the remaining steps were measured
|
|
7
7
|
* from the rendered site.
|
|
8
8
|
*
|
|
9
|
-
* One family, no display face, no serif
|
|
9
|
+
* One family, no display face, no serif. Manrope follows Satoshi in the stack
|
|
10
|
+
* only for the Cyrillic Satoshi lacks; see its @font-face in colors_and_type.css.
|
|
10
11
|
*/
|
|
11
12
|
export declare const fontFamily: {
|
|
12
|
-
readonly sans: "Satoshi, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", Arial, sans-serif";
|
|
13
|
+
readonly sans: "Satoshi, Manrope, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", Arial, sans-serif";
|
|
13
14
|
readonly mono: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace";
|
|
14
15
|
};
|
|
15
16
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../tokens/typography.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../tokens/typography.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,UAAU;;;CAGb,CAAC;AAEX;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUX,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,OAAO;;;;;;;CAOV,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,QAAQ,CAAC;AACjD,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,UAAU,CAAC"}
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
* come from the production `@theme` block; the remaining steps were measured
|
|
7
7
|
* from the rendered site.
|
|
8
8
|
*
|
|
9
|
-
* One family, no display face, no serif
|
|
9
|
+
* One family, no display face, no serif. Manrope follows Satoshi in the stack
|
|
10
|
+
* only for the Cyrillic Satoshi lacks; see its @font-face in colors_and_type.css.
|
|
10
11
|
*/
|
|
11
12
|
export const fontFamily = {
|
|
12
|
-
sans: 'Satoshi, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif',
|
|
13
|
+
sans: 'Satoshi, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif',
|
|
13
14
|
mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
|
14
15
|
};
|
|
15
16
|
/**
|
package/dist/tokens.css
CHANGED
|
@@ -106,11 +106,12 @@
|
|
|
106
106
|
|
|
107
107
|
/* =========================================================================
|
|
108
108
|
* TYPOGRAPHY
|
|
109
|
-
* One family
|
|
110
|
-
*
|
|
109
|
+
* One family, and Manrope for the Cyrillic it lacks (see "Cyrillic" above).
|
|
110
|
+
* Named heading sizes come from the production @theme block; the remaining
|
|
111
|
+
* steps are measured from the live site.
|
|
111
112
|
* ====================================================================== */
|
|
112
|
-
--font-sans: Satoshi, -apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
113
|
-
"Helvetica Neue", "Noto Sans", Arial, sans-serif;
|
|
113
|
+
--font-sans: Satoshi, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
114
|
+
Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
|
|
114
115
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
115
116
|
"Liberation Mono", "Courier New", monospace;
|
|
116
117
|
|
package/package.json
CHANGED