@master/css-preset 2.0.0-rc.70
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 +52 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.mjs +1 -0
- package/package.json +1 -0
- package/src/base.css +221 -0
- package/src/default-manifest.json +1 -0
- package/src/default-manifest.json.d.ts +4 -0
- package/src/index.css +4 -0
- package/src/theme.css +722 -0
- package/src/utilities.css +769 -0
- package/src/variants.css +221 -0
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# @master/css-preset
|
|
2
|
+
|
|
3
|
+
The default Master CSS preset source and compiled manifest.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @master/css-preset
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Most applications should import preset styles through `@master/css`. Use this package directly when tooling needs the preset package boundary.
|
|
12
|
+
|
|
13
|
+
## CSS entries
|
|
14
|
+
|
|
15
|
+
```css
|
|
16
|
+
@import '@master/css-preset';
|
|
17
|
+
@import '@master/css-preset/base.css';
|
|
18
|
+
@import '@master/css-preset/theme.css';
|
|
19
|
+
@import '@master/css-preset/variants.css';
|
|
20
|
+
@import '@master/css-preset/utilities.css';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The default index entry contains:
|
|
24
|
+
|
|
25
|
+
```css
|
|
26
|
+
@import "./base.css";
|
|
27
|
+
@import "./theme.css";
|
|
28
|
+
@import "./variants.css";
|
|
29
|
+
@import "./utilities.css";
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`base.css` declares the stable cascade layer order:
|
|
33
|
+
|
|
34
|
+
```css
|
|
35
|
+
@layer theme, base, defaults, components, utilities;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Manifest
|
|
39
|
+
|
|
40
|
+
The compiled default manifest is available as JSON:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import defaultManifest from '@master/css-preset/default-manifest.json'
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The generated manifest is derived from the preset CSS source. Do not edit generated manifest output by hand.
|
|
47
|
+
|
|
48
|
+
## Related packages
|
|
49
|
+
|
|
50
|
+
- `@master/css` re-exports the preset CSS entries for application use.
|
|
51
|
+
- `@master/css-engine` owns built-in key aliases and native value namespaces.
|
|
52
|
+
- `@master/css-compiler` compiles preset CSS source into manifest data.
|
package/dist/index.d.ts
ADDED
|
File without changes
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"@master/css-preset","type":"module","scripts":{"build":"pnpm generate && techor build \"src/**/!(*.d).ts\" --formats esm","dev":"pnpm build --watch","generate":"node --import tsx scripts/generate-default-manifest.ts","lint":"eslint","type-check":"tsc --noEmit","test":"vitest"},"license":"MIT","description":"The default Master CSS preset source and compiled manifest.","author":"Aoyue Design LLC.","funding":"https://rc.css.master.co/sponsor","homepage":"https://css.master.co","bugs":{"url":"https://github.com/master-co/css/issues"},"repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/preset"},"keywords":["preset","css","mastercss"],"sideEffects":["./src/*.css"],"main":"./dist/index.mjs","module":"./dist/index.mjs","jsnext:main":"./dist/index.mjs","esnext":"./dist/index.mjs","types":"./dist/index.d.ts","style":"./src/index.css","exports":{".":{"style":"./src/index.css","types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.mjs"},"./default-manifest.json":{"types":"./src/default-manifest.json.d.ts","import":"./src/default-manifest.json","default":"./src/default-manifest.json"},"./index.css":"./src/index.css","./base.css":"./src/base.css","./theme.css":"./src/theme.css","./variants.css":"./src/variants.css","./utilities.css":"./src/utilities.css"},"files":["dist","src/*.css","src/default-manifest.json","src/default-manifest.json.d.ts"],"publishConfig":{"access":"public","provenance":true},"devDependencies":{"tsx":"^4.22.4"},"version":"2.0.0-rc.70"}
|
package/src/base.css
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
@layer theme, base, defaults, components, utilities;
|
|
2
|
+
|
|
3
|
+
@layer base {
|
|
4
|
+
/* Improve text rendering precision across browsers. */
|
|
5
|
+
* {
|
|
6
|
+
text-rendering: geometricPrecision;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* Normalize body text metrics and font smoothing. */
|
|
10
|
+
body {
|
|
11
|
+
line-height: 1.2;
|
|
12
|
+
text-size-adjust: 100%;
|
|
13
|
+
-webkit-text-size-adjust: 100%;
|
|
14
|
+
-moz-text-size-adjust: 100%;
|
|
15
|
+
-ms-text-size-adjust: 100%;
|
|
16
|
+
-moz-osx-font-smoothing: grayscale;
|
|
17
|
+
-webkit-font-smoothing: antialiased;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Remove touch delay from common interactive elements. */
|
|
21
|
+
a, button {
|
|
22
|
+
touch-action: manipulation;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Prevent accidental text selection on button-like controls. */
|
|
26
|
+
[role=button], summary,
|
|
27
|
+
button, [type=button] {
|
|
28
|
+
-webkit-user-select: none;
|
|
29
|
+
user-select: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Use border-box sizing for all elements and pseudo-elements. */
|
|
33
|
+
*, ::before, ::after {
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Normalize tab width for readable preformatted text. */
|
|
38
|
+
body {
|
|
39
|
+
-moz-tab-size: 4;
|
|
40
|
+
tab-size: 4;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Make embedded media responsive and block-level by default. */
|
|
44
|
+
img, svg, video, canvas, audio, iframe, embed, object {
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
display: block;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* consistent */
|
|
50
|
+
|
|
51
|
+
/* Keep the root viewport height consistent on modern and WebKit browsers. */
|
|
52
|
+
html, body {
|
|
53
|
+
height: 100dvh;
|
|
54
|
+
height: -webkit-fill-available;
|
|
55
|
+
height: -moz-available;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Ensure abbreviated text with titles has a consistent underline style. */
|
|
59
|
+
abbr[title] {
|
|
60
|
+
text-decoration: underline dotted;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Keep bold text semantically stronger than surrounding text. */
|
|
64
|
+
b, strong {
|
|
65
|
+
font-weight: bolder;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Normalize monospace-related element sizing. */
|
|
69
|
+
pre,
|
|
70
|
+
code,
|
|
71
|
+
kbd,
|
|
72
|
+
samp {
|
|
73
|
+
font-size: 1em;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Remove Firefox inner focus padding and border from controls. */
|
|
77
|
+
::-moz-focus-inner {
|
|
78
|
+
border-style: none;
|
|
79
|
+
padding: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Remove Firefox invalid field shadows. */
|
|
83
|
+
:-moz-ui-invalid {
|
|
84
|
+
box-shadow: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Align progress elements consistently with surrounding text. */
|
|
88
|
+
progress {
|
|
89
|
+
vertical-align: baseline;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Normalize search input appearance and outline offset. */
|
|
93
|
+
[type="search"] {
|
|
94
|
+
appearance: textfield;
|
|
95
|
+
outline-offset: -2px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Keep WebKit number input spin buttons at their native height. */
|
|
99
|
+
::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
|
|
100
|
+
height: auto;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Remove WebKit search input decoration. */
|
|
104
|
+
::-webkit-search-decoration {
|
|
105
|
+
-webkit-appearance: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Normalize WebKit file upload button appearance and font. */
|
|
109
|
+
::-webkit-file-upload-button {
|
|
110
|
+
-webkit-appearance: button;
|
|
111
|
+
font: inherit;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Normalize horizontal rule size and color inheritance. */
|
|
115
|
+
hr {
|
|
116
|
+
height: 0;
|
|
117
|
+
color: inherit;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Normalize small text sizing. */
|
|
121
|
+
small {
|
|
122
|
+
font-size: 80%;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Normalize superscript and subscript sizing and positioning context. */
|
|
126
|
+
sub, sup {
|
|
127
|
+
font-size: 75%;
|
|
128
|
+
line-height: 0;
|
|
129
|
+
position: relative;
|
|
130
|
+
vertical-align: baseline;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Position subscripts consistently below the baseline. */
|
|
134
|
+
sub {
|
|
135
|
+
bottom: -0.25em;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Position superscripts consistently above the baseline. */
|
|
139
|
+
sup {
|
|
140
|
+
top: -0.5em;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Normalize table indentation and border color inheritance. */
|
|
144
|
+
table {
|
|
145
|
+
text-indent: 0;
|
|
146
|
+
border-color: inherit;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Apply the default sans font stack to documents and shadow hosts. */
|
|
150
|
+
body, :host {
|
|
151
|
+
font-family: var(--font-family-sans);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Apply the default monospace font stack to code-related elements. */
|
|
155
|
+
code, kbd, samp, pre {
|
|
156
|
+
font-family: var(--font-family-mono);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* remove */
|
|
160
|
+
|
|
161
|
+
/* Remove default link color and underline styles. */
|
|
162
|
+
a {
|
|
163
|
+
color: inherit;
|
|
164
|
+
text-decoration: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Reset form control typography, spacing, color, and background. */
|
|
168
|
+
button, input, optgroup, select, textarea {
|
|
169
|
+
font: inherit;
|
|
170
|
+
font-feature-settings: inherit;
|
|
171
|
+
font-variation-settings: inherit;
|
|
172
|
+
font-size: 100%;
|
|
173
|
+
margin: 0;
|
|
174
|
+
padding: 0;
|
|
175
|
+
color: inherit;
|
|
176
|
+
background-color: transparent;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* Remove default borders while keeping solid border style as the baseline. */
|
|
180
|
+
*, ::before, ::after {
|
|
181
|
+
border-width: 0;
|
|
182
|
+
border-style: solid;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* Remove default margins from common block and text elements. */
|
|
186
|
+
body, blockquote, dl, dd, hr, figure, p, pre, h1, h2, h3, h4, h5, h6 {
|
|
187
|
+
margin: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Remove default padding from table cells and form grouping elements. */
|
|
191
|
+
td, legend, fieldset {
|
|
192
|
+
padding: 0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* Remove default list spacing. */
|
|
196
|
+
ul, ol {
|
|
197
|
+
margin: 0;
|
|
198
|
+
padding: 0;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* Remove mobile tap highlight color. */
|
|
202
|
+
body {
|
|
203
|
+
-webkit-tap-highlight-color: transparent;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* Remove unordered list markers. */
|
|
207
|
+
ul {
|
|
208
|
+
list-style: none;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* Reset heading typography to inherit from surrounding text. */
|
|
212
|
+
h1, h2, h3, h4, h5, h6 {
|
|
213
|
+
font-size: inherit;
|
|
214
|
+
font-weight: inherit;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Hide elements marked with the hidden attribute. */
|
|
218
|
+
[hidden] {
|
|
219
|
+
display: none;
|
|
220
|
+
}
|
|
221
|
+
}
|