@classic-homes/theme-styles 0.4.0 → 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/package.json +3 -1
- package/src/base.css +4 -15
- package/src/core.css +26 -0
- package/src/fonts.css +14 -0
- package/src/index.css +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@classic-homes/theme-styles",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Base styles and utilities for the Classic Theme design system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
10
|
".": "./src/index.css",
|
|
11
|
+
"./core": "./src/core.css",
|
|
12
|
+
"./fonts": "./src/fonts.css",
|
|
11
13
|
"./base": "./src/base.css",
|
|
12
14
|
"./accessibility": "./src/accessibility.css",
|
|
13
15
|
"./utilities": "./src/utilities.css"
|
package/src/base.css
CHANGED
|
@@ -6,21 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* other rule, and browsers silently drop it inside a @layer block.
|
|
13
|
-
*
|
|
14
|
-
* PERFORMANCE NOTE: This @import causes a render-blocking network request.
|
|
15
|
-
* For best performance, load fonts via <link> in your HTML <head>:
|
|
16
|
-
*
|
|
17
|
-
* <link rel="preconnect" href="https://fonts.googleapis.com">
|
|
18
|
-
* <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
19
|
-
* <link href="https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;900&family=Spectral:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&display=swap" rel="stylesheet">
|
|
20
|
-
*
|
|
21
|
-
* If you load fonts via HTML, you can safely remove this @import.
|
|
9
|
+
* Brand fonts (Figtree, Spectral) are loaded by ./fonts.css, which index.css
|
|
10
|
+
* includes. Import ./core instead of the package root to leave them out and
|
|
11
|
+
* load fonts from your HTML <head> without blocking render (see fonts.css).
|
|
22
12
|
*/
|
|
23
|
-
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;900&family=Spectral:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&display=swap');
|
|
24
13
|
|
|
25
14
|
@layer classic-theme.base {
|
|
26
15
|
/* Base HTML setup */
|
|
@@ -78,7 +67,7 @@
|
|
|
78
67
|
font-weight: 500;
|
|
79
68
|
font-style: italic;
|
|
80
69
|
font-size: 2.5rem; /* 40px */
|
|
81
|
-
line-height: 2rem
|
|
70
|
+
line-height: 2.75rem; /* 2rem overlapped wrapped lines */
|
|
82
71
|
}
|
|
83
72
|
|
|
84
73
|
h2,
|
package/src/core.css
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Classic Theme Styles — without the brand-font @import (see fonts.css)
|
|
3
|
+
*
|
|
4
|
+
* Main entry point for all Classic Theme styles.
|
|
5
|
+
* Import this file in your app.css before Tailwind directives:
|
|
6
|
+
*
|
|
7
|
+
* @import '@classic-homes/theme-styles';
|
|
8
|
+
* @tailwind base;
|
|
9
|
+
* @tailwind components;
|
|
10
|
+
* @tailwind utilities;
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/* Define CSS layer order - lowest to highest specificity */
|
|
14
|
+
@layer classic-theme.tokens, classic-theme.base, classic-theme.components, classic-theme.utilities;
|
|
15
|
+
|
|
16
|
+
/* Import design tokens (CSS custom properties) */
|
|
17
|
+
@import '@classic-homes/theme-tokens/css';
|
|
18
|
+
|
|
19
|
+
/* Import base styles */
|
|
20
|
+
@import './base.css';
|
|
21
|
+
|
|
22
|
+
/* Import accessibility styles */
|
|
23
|
+
@import './accessibility.css';
|
|
24
|
+
|
|
25
|
+
/* Import utility classes */
|
|
26
|
+
@import './utilities.css';
|
package/src/fonts.css
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Classic Theme brand fonts (Figtree, Spectral) from Google Fonts.
|
|
3
|
+
*
|
|
4
|
+
* Included by the package root (index.css). This @import is render-blocking:
|
|
5
|
+
* the page cannot paint until fonts.googleapis.com answers, so a slow or
|
|
6
|
+
* filtered network shows a blank page. For production apps prefer
|
|
7
|
+
* `@classic-homes/theme-styles/core` plus non-blocking <link> tags in <head>:
|
|
8
|
+
*
|
|
9
|
+
* <link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
+
* <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
11
|
+
* <link rel="stylesheet" media="print" onload="this.media='all'"
|
|
12
|
+
* href="https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;900&family=Spectral:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&display=swap">
|
|
13
|
+
*/
|
|
14
|
+
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;900&family=Spectral:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&display=swap');
|
package/src/index.css
CHANGED
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
* @tailwind utilities;
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
/* Brand fonts. Must precede every rule except @layer statements; ./core omits it. */
|
|
14
|
+
@import './fonts.css';
|
|
15
|
+
|
|
13
16
|
/* Define CSS layer order - lowest to highest specificity */
|
|
14
17
|
@layer classic-theme.tokens, classic-theme.base, classic-theme.components, classic-theme.utilities;
|
|
15
18
|
|