@master/css 2.0.0-rc.20 → 2.0.0-rc.22

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,3 +1,4 @@
1
+ import colors from '@master/colors';
1
2
  import mediaQueries from '../tokens/screen-sizes.mjs';
2
3
 
3
4
  const variables = {
@@ -104,478 +105,10 @@ const variables = {
104
105
  margin: 'margin-box',
105
106
  fill: 'fill-box',
106
107
  stroke: 'stroke-box',
107
- view: 'view-box',
108
- black: '#000000'
108
+ view: 'view-box'
109
109
  },
110
110
  current: 'currentColor',
111
- 'text': {
112
- 'invert': {
113
- '@light': '#ffffff',
114
- '@dark': '#000000'
115
- },
116
- 'strong': {
117
- '@light': '$(slate-95)',
118
- '@dark': '$(gray-10)'
119
- },
120
- 'neutral': {
121
- '@light': '$(slate-70)',
122
- '@dark': '$(gray-30)'
123
- },
124
- 'lightest': {
125
- '@light': '$(slate-30)',
126
- '@dark': '$(gray-60)'
127
- },
128
- 'lighter': {
129
- '@light': '$(slate-40)',
130
- '@dark': '$(gray-50)'
131
- },
132
- 'light': {
133
- '@light': '$(slate-50)',
134
- '@dark': '$(gray-40)'
135
- },
136
- 'gray': {
137
- '@light': '$(gray-60)',
138
- '@dark': '$(gray-30)'
139
- },
140
- 'slate': {
141
- '@light': '$(slate-60)',
142
- '@dark': '$(slate-30)'
143
- },
144
- 'brown': {
145
- '@light': '$(brown-60)',
146
- '@dark': '$(brown-30)'
147
- },
148
- 'orange': {
149
- '@light': '$(orange-60)',
150
- '@dark': '$(orange-30)'
151
- },
152
- 'amber': {
153
- '@light': '$(amber-60)',
154
- '@dark': '$(amber-40)'
155
- },
156
- 'yellow': {
157
- '@light': '$(yellow-60)',
158
- '@dark': '$(yellow-40)'
159
- },
160
- 'lime': {
161
- '@light': '$(lime-70)',
162
- '@dark': '$(lime-40)'
163
- },
164
- 'green': {
165
- '@light': '$(green-70)',
166
- '@dark': '$(green-40)'
167
- },
168
- 'beryl': {
169
- '@light': '$(beryl-70)',
170
- '@dark': '$(beryl-40)'
171
- },
172
- 'teal': {
173
- '@light': '$(teal-70)',
174
- '@dark': '$(teal-40)'
175
- },
176
- 'cyan': {
177
- '@light': '$(cyan-70)',
178
- '@dark': '$(cyan-40)'
179
- },
180
- 'sky': {
181
- '@light': '$(sky-70)',
182
- '@dark': '$(sky-30)'
183
- },
184
- 'blue': {
185
- '@light': '$(blue-60)',
186
- '@dark': '$(blue-30)'
187
- },
188
- 'indigo': {
189
- '@light': '$(indigo-60)',
190
- '@dark': '$(indigo-30)'
191
- },
192
- 'violet': {
193
- '@light': '$(violet-60)',
194
- '@dark': '$(violet-30)'
195
- },
196
- 'purple': {
197
- '@light': '$(purple-60)',
198
- '@dark': '$(purple-30)'
199
- },
200
- 'fuchsia': {
201
- '@light': '$(fuchsia-60)',
202
- '@dark': '$(fuchsia-30)'
203
- },
204
- 'pink': {
205
- '@light': '$(pink-60)',
206
- '@dark': '$(pink-30)'
207
- },
208
- 'crimson': {
209
- '@light': '$(crimson-60)',
210
- '@dark': '$(crimson-30)'
211
- },
212
- 'red': {
213
- '@light': '$(red-60)',
214
- '@dark': '$(red-30)'
215
- }
216
- },
217
- 'base': {
218
- '@light': '$(white)',
219
- '@dark': '$(gray-95)'
220
- },
221
- 'canvas': {
222
- '@light': '$(slate-5)',
223
- '@dark': '$(gray-90)'
224
- },
225
- 'surface': {
226
- '@light': '$(white)',
227
- '@dark': '$(gray-80)'
228
- },
229
- 'invert': {
230
- '@light': '#000000',
231
- '@dark': '#ffffff'
232
- },
233
- 'white': '#ffffff',
234
- 'black': '#000000',
235
- 'frame': {
236
- '@light': '$(slate-60)',
237
- '@dark': '$(gray-30)'
238
- },
239
- 'gray': {
240
- '5': '#f6f5f7',
241
- '10': '#efeef0',
242
- '20': '#cdccce',
243
- '30': '#a2a1a3',
244
- '40': '#89888a',
245
- '50': '#737274',
246
- '60': '#585759',
247
- '70': '#444345',
248
- '80': '#323133',
249
- '90': '#29282a',
250
- '95': '#222123',
251
- '': {
252
- '@light': '$(gray-30)',
253
- '@dark': '$(gray-40)'
254
- }
255
- },
256
- 'slate': {
257
- '5': '#f8f9fb',
258
- '10': '#eff2f9',
259
- '20': '#c8d0e3',
260
- '30': '#9fabc6',
261
- '40': '#7c8cab',
262
- '50': '#5f7395',
263
- '60': '#455572',
264
- '70': '#37455d',
265
- '80': '#283348',
266
- '90': '#1d273a',
267
- '95': '#182030',
268
- '': {
269
- '@light': '$(slate-30)',
270
- '@dark': '$(slate-40)'
271
- }
272
- },
273
- 'brown': {
274
- '5': '#fff6f0',
275
- '10': '#feefe3',
276
- '20': '#f3bea4',
277
- '30': '#e7976e',
278
- '40': '#da7c4d',
279
- '50': '#cc6633',
280
- '60': '#b65325',
281
- '70': '#9d4119',
282
- '80': '#833111',
283
- '90': '#692007',
284
- '95': '#431304',
285
- '': {
286
- '@light': '$(brown-40)',
287
- '@dark': '$(brown-50)'
288
- }
289
- },
290
- 'orange': {
291
- '5': '#fff5ea',
292
- '10': '#fff5df',
293
- '20': '#ffcb9e',
294
- '30': '#ff9b47',
295
- '40': '#ff8528',
296
- '50': '#ff6c0a',
297
- '60': '#e05200',
298
- '70': '#bc3e00',
299
- '80': '#992d00',
300
- '90': '#701d00',
301
- '95': '#471100',
302
- '': {
303
- '@light': '$(orange-40)',
304
- '@dark': '$(orange-50)'
305
- }
306
- },
307
- 'amber': {
308
- '5': '#fff9eb',
309
- '10': '#fff4db',
310
- '20': '#ffe099',
311
- '30': '#ffc133',
312
- '40': '#ffb10a',
313
- '50': '#f99e00',
314
- '60': '#e57e00',
315
- '70': '#c15d00',
316
- '80': '#a34900',
317
- '90': '#753200',
318
- '95': '#4c1f00',
319
- '': {
320
- '@light': '$(amber-40)',
321
- '@dark': '$(amber-50)'
322
- }
323
- },
324
- 'yellow': {
325
- '5': '#fffae5',
326
- '10': '#fffed1',
327
- '20': '#ffe993',
328
- '30': '#ffd233',
329
- '40': '#ffc300',
330
- '50': '#efaf00',
331
- '60': '#d69200',
332
- '70': '#b77400',
333
- '80': '#9e5c00',
334
- '90': '#753c00',
335
- '95': '#4c2600',
336
- '': {
337
- '@light': '$(yellow-40)',
338
- '@dark': '$(yellow-50)'
339
- }
340
- },
341
- 'lime': {
342
- '5': '#f5ffe5',
343
- '10': '#f5ffd6',
344
- '20': '#d1fb8d',
345
- '30': '#acec46',
346
- '40': '#91d91a',
347
- '50': '#77c012',
348
- '60': '#61a60c',
349
- '70': '#4c8d07',
350
- '80': '#367604',
351
- '90': '#256000',
352
- '95': '#1b3d00',
353
- '': {
354
- '@light': '$(lime-40)',
355
- '@dark': '$(lime-50)'
356
- }
357
- },
358
- 'green': {
359
- '5': '#e7fdea',
360
- '10': '#dbfee4',
361
- '20': '#a5f7b8',
362
- '30': '#35ed66',
363
- '40': '#00d655',
364
- '50': '#00c147',
365
- '60': '#00ad3f',
366
- '70': '#008e34',
367
- '80': '#007a2c',
368
- '90': '#006023',
369
- '95': '#003d16',
370
- '': {
371
- '@light': '$(green-40)',
372
- '@dark': '$(green-50)'
373
- }
374
- },
375
- 'beryl': {
376
- '5': '#e0fef2',
377
- '10': '#d2fff7',
378
- '20': '#6cffd4',
379
- '30': '#0fefa4',
380
- '40': '#04e09e',
381
- '50': '#04cb8f',
382
- '60': '#00b277',
383
- '70': '#009360',
384
- '80': '#007f50',
385
- '90': '#00663e',
386
- '95': '#003d24',
387
- '': {
388
- '@light': '$(beryl-40)',
389
- '@dark': '$(beryl-50)'
390
- }
391
- },
392
- 'teal': {
393
- '5': '#dbfefd',
394
- '10': '#cfffff',
395
- '20': '#7ffff6',
396
- '30': '#00f4e4',
397
- '40': '#00e4d4',
398
- '50': '#00ccc8',
399
- '60': '#00aeb7',
400
- '70': '#0092a3',
401
- '80': '#00798e',
402
- '90': '#005d75',
403
- '95': '#003747',
404
- '': {
405
- '@light': '$(teal-40)',
406
- '@dark': '$(teal-50)'
407
- }
408
- },
409
- 'cyan': {
410
- '5': '#e0ffff',
411
- '10': '#d1ffff',
412
- '20': '#7ff6ff',
413
- '30': '#1ee1ff',
414
- '40': '#00ccf9',
415
- '50': '#00b3ea',
416
- '60': '#0099d6',
417
- '70': '#007dbc',
418
- '80': '#0067a8',
419
- '90': '#005089',
420
- '95': '#003156',
421
- '': {
422
- '@light': '$(cyan-40)',
423
- '@dark': '$(cyan-50)'
424
- }
425
- },
426
- 'sky': {
427
- '5': '#e5f5ff',
428
- '10': '#d9f8ff',
429
- '20': '#a3deff',
430
- '30': '#6bc6ff',
431
- '40': '#34b2fd',
432
- '50': '#059fff',
433
- '60': '#008df9',
434
- '70': '#0073e0',
435
- '80': '#005cc6',
436
- '90': '#0041a3',
437
- '95': '#002566',
438
- '': {
439
- '@light': '$(sky-60)',
440
- '@dark': '$(sky-50)'
441
- }
442
- },
443
- 'blue': {
444
- '5': '#e5f3fe',
445
- '10': '#dbf2fe',
446
- '20': '#add7ff',
447
- '30': '#70b0ff',
448
- '40': '#4c93fd',
449
- '50': '#3a7cff',
450
- '60': '#2563fd',
451
- '70': '#1b53ec',
452
- '80': '#1947d1',
453
- '90': '#1735a2',
454
- '95': '#102069',
455
- '': {
456
- '@light': '$(blue-60)',
457
- '@dark': '$(blue-50)'
458
- }
459
- },
460
- 'indigo': {
461
- '5': '#f0f1fe',
462
- '10': '#e9ecfe',
463
- '20': '#c8cdfe',
464
- '30': '#939eff',
465
- '40': '#7e81fe',
466
- '50': '#7068ff',
467
- '60': '#5b4cfd',
468
- '70': '#4e39ed',
469
- '80': '#4732d2',
470
- '90': '#3623a3',
471
- '95': '#26176c',
472
- '': {
473
- '@light': '$(indigo-60)',
474
- '@dark': '$(indigo-50)'
475
- }
476
- },
477
- 'violet': {
478
- '5': '#f2efff',
479
- '10': '#efe8ff',
480
- '20': '#d7c5ff',
481
- '30': '#b198fe',
482
- '40': '#9a70ff',
483
- '50': '#8e56fe',
484
- '60': '#812fff',
485
- '70': '#7407f2',
486
- '80': '#6405d1',
487
- '90': '#4f05a3',
488
- '95': '#35036e',
489
- '': {
490
- '@light': '$(violet-60)',
491
- '@dark': '$(violet-50)'
492
- }
493
- },
494
- 'purple': {
495
- '5': '#f6f0ff',
496
- '10': '#f6e8fe',
497
- '20': '#e2bffe',
498
- '30': '#c492fd',
499
- '40': '#b266ff',
500
- '50': '#a849fe',
501
- '60': '#9514ff',
502
- '70': '#8200e5',
503
- '80': '#7100c1',
504
- '90': '#58008e',
505
- '95': '#3e0060',
506
- '': {
507
- '@light': '$(purple-60)',
508
- '@dark': '$(purple-50)'
509
- }
510
- },
511
- 'fuchsia': {
512
- '5': '#faf0ff',
513
- '10': '#fde8fe',
514
- '20': '#f0baff',
515
- '30': '#dd89fe',
516
- '40': '#d760fe',
517
- '50': '#cf33ff',
518
- '60': '#b700e5',
519
- '70': '#a200c6',
520
- '80': '#8700a3',
521
- '90': '#660175',
522
- '95': '#480051',
523
- '': {
524
- '@light': '$(fuchsia-60)',
525
- '@dark': '$(fuchsia-50)'
526
- }
527
- },
528
- 'pink': {
529
- '5': '#fef1f9',
530
- '10': '#fee9f8',
531
- '20': '#ffb8df',
532
- '30': '#f986c1',
533
- '40': '#fa65b2',
534
- '50': '#f747a2',
535
- '60': '#ef2188',
536
- '70': '#d61673',
537
- '80': '#b80c5c',
538
- '90': '#8f0543',
539
- '95': '#64032f',
540
- '': {
541
- '@light': '$(pink-60)',
542
- '@dark': '$(pink-50)'
543
- }
544
- },
545
- 'crimson': {
546
- '5': '#ffeff2',
547
- '10': '#ffe8ec',
548
- '20': '#ffbac7',
549
- '30': '#ff849d',
550
- '40': '#ff6684',
551
- '50': '#fc4065',
552
- '60': '#ed2a51',
553
- '70': '#d7173e',
554
- '80': '#bb1536',
555
- '90': '#8f132c',
556
- '95': '#620e1f',
557
- '': {
558
- '@light': '$(crimson-60)',
559
- '@dark': '$(crimson-50)'
560
- }
561
- },
562
- 'red': {
563
- '5': '#ffefef',
564
- '10': '#fee8e8',
565
- '20': '#ffbcbc',
566
- '30': '#ff8787',
567
- '40': '#fd5f5f',
568
- '50': '#f73f3f',
569
- '60': '#e52e2e',
570
- '70': '#d01b1b',
571
- '80': '#b81919',
572
- '90': '#921515',
573
- '95': '#650f0f',
574
- '': {
575
- '@light': '$(red-60)',
576
- '@dark': '$(red-50)'
577
- }
578
- }
111
+ ...colors
579
112
  };
580
113
 
581
114
  export { variables as default };
package/dist/rule.cjs CHANGED
@@ -5,7 +5,7 @@ var cssEscape = require('./shared/utils/css-escape.cjs');
5
5
  var layer = require('./layer.cjs');
6
6
  var baseUnitRegex = require('./constants/base-unit-regex.cjs');
7
7
 
8
- const atRuleRegExp = /^(media|supports|page|font-face|keyframes|counter-style|font-feature-values|property|layer)(?=\||{|\(|$)/;
8
+ const atRuleRegExp = /^(media|supports|page|font-face|keyframes|counter-style|font-feature-values|property|layer|container)(?=\||{|\(|$)/;
9
9
  class Rule {
10
10
  className;
11
11
  css;
@@ -469,9 +469,7 @@ class Rule {
469
469
  const analyzeToken = (typeOrFeatureToken)=>{
470
470
  if (typeOrFeatureToken === 'all' || typeOrFeatureToken === 'print' || typeOrFeatureToken === 'screen' || typeOrFeatureToken === 'speech') {
471
471
  this.media.type = typeOrFeatureToken;
472
- } else if (typeOrFeatureToken === '🖨') {
473
- this.media.type = 'print';
474
- } else {
472
+ } else if (typeOrFeatureToken.startsWith('')) {
475
473
  if (typeOrFeatureToken === 'landscape' || typeOrFeatureToken === 'portrait') {
476
474
  queryTexts.push('(orientation:' + typeOrFeatureToken + ')');
477
475
  } else if (typeOrFeatureToken === 'motion' || typeOrFeatureToken === 'reduced-motion') {
package/dist/rule.mjs CHANGED
@@ -3,7 +3,7 @@ import cssEscape from './shared/utils/css-escape.mjs';
3
3
  import { Layer } from './layer.mjs';
4
4
  import { BASE_UNIT_REGEX } from './constants/base-unit-regex.mjs';
5
5
 
6
- const atRuleRegExp = /^(media|supports|page|font-face|keyframes|counter-style|font-feature-values|property|layer)(?=\||{|\(|$)/;
6
+ const atRuleRegExp = /^(media|supports|page|font-face|keyframes|counter-style|font-feature-values|property|layer|container)(?=\||{|\(|$)/;
7
7
  class Rule {
8
8
  className;
9
9
  css;
@@ -467,9 +467,7 @@ class Rule {
467
467
  const analyzeToken = (typeOrFeatureToken)=>{
468
468
  if (typeOrFeatureToken === 'all' || typeOrFeatureToken === 'print' || typeOrFeatureToken === 'screen' || typeOrFeatureToken === 'speech') {
469
469
  this.media.type = typeOrFeatureToken;
470
- } else if (typeOrFeatureToken === '🖨') {
471
- this.media.type = 'print';
472
- } else {
470
+ } else if (typeOrFeatureToken.startsWith('')) {
473
471
  if (typeOrFeatureToken === 'landscape' || typeOrFeatureToken === 'portrait') {
474
472
  queryTexts.push('(orientation:' + typeOrFeatureToken + ')');
475
473
  } else if (typeOrFeatureToken === 'motion' || typeOrFeatureToken === 'reduced-motion') {
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@master/css","type":"module","scripts":{"build":"techor build \"src/**/*.ts\"","dev":"pnpm build --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"The CSS language and framework for rapidly building modern and high-performance websites","author":"Aoyue Design LLC.","funding":"https://css.master.co/docs/donate","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/css"},"keywords":["style","styles","html","variants","virtual","virtual-css","utility","css","ui","lightweight","class","webpack","plugin","integration","vite","parcel","build-tools","mastercss"],"sideEffects":false,"main":"./dist/index.cjs","jsnext:main":"./dist/index.mjs","esnext":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"bin":"./dist/bin/index.mjs","files":["dist"],"publishConfig":{"access":"public","provenance":true},"dependencies":{"@master/normal.css":"^2.0.0-rc.20","@techor/extend":"^3.0.16"},"devDependencies":{"css-shared":"^2.0.0-rc.20","csstype":"^3.1.3"},"version":"2.0.0-rc.20"}
1
+ {"name":"@master/css","type":"module","scripts":{"build":"techor build \"src/**/*.ts\"","dev":"pnpm build --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"The CSS language and framework for rapidly building modern and high-performance websites","author":"Aoyue Design LLC.","funding":"https://css.master.co/docs/donate","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/css"},"keywords":["style","styles","html","variants","virtual","virtual-css","utility","css","ui","lightweight","class","webpack","plugin","integration","vite","parcel","build-tools","mastercss"],"sideEffects":false,"main":"./dist/index.cjs","jsnext:main":"./dist/index.mjs","esnext":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"bin":"./dist/bin/index.mjs","files":["dist"],"publishConfig":{"access":"public","provenance":true},"dependencies":{"@master/colors":"rc","@master/normal.css":"^2.0.0-rc.22","@techor/extend":"^3.0.16"},"devDependencies":{"css-shared":"^2.0.0-rc.22","csstype":"^3.1.3"},"version":"2.0.0-rc.22"}