@master/css 2.0.0-beta.40 → 2.0.0-beta.41
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 +122 -107
- package/dist/apis/extend.d.ts +1 -1
- package/dist/config/index.d.ts +5 -5
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +3 -3
- package/dist/rules/border-color.d.ts +1 -1
- package/dist/rules/border-radius.d.ts +1 -1
- package/dist/rules/border-style.d.ts +1 -1
- package/dist/rules/border-width.d.ts +1 -1
- package/dist/rules/border.d.ts +1 -1
- package/dist/rules/font-smoothing.d.ts +1 -1
- package/dist/rules/gap.d.ts +1 -1
- package/dist/rules/group.d.ts +1 -1
- package/dist/rules/lines.d.ts +1 -1
- package/dist/rules/margin.d.ts +1 -1
- package/dist/rules/overflow.d.ts +1 -1
- package/dist/rules/overscroll-behavior.d.ts +1 -1
- package/dist/rules/padding.d.ts +1 -1
- package/dist/rules/placement.d.ts +1 -1
- package/dist/rules/scroll-margin.d.ts +1 -1
- package/dist/rules/scroll-padding.d.ts +1 -1
- package/dist/rules/spacing.d.ts +1 -1
- package/dist/rules/text-fill-color.d.ts +1 -1
- package/dist/rules/text-size.d.ts +1 -1
- package/dist/rules/text-stroke-color.d.ts +1 -1
- package/dist/rules/text-stroke-width.d.ts +1 -1
- package/dist/rules/text-stroke.d.ts +1 -1
- package/dist/rules/variable.d.ts +1 -1
- package/dist/utils/is-plain-object.d.ts +1 -1
- package/package.json +16 -108
package/README.md
CHANGED
|
@@ -1,117 +1,132 @@
|
|
|
1
|
-
<br
|
|
1
|
+
<br>
|
|
2
2
|
<div align="center">
|
|
3
3
|
|
|
4
4
|
<p align="center">
|
|
5
|
-
<img src="https://
|
|
5
|
+
<img src="https://user-images.githubusercontent.com/33840671/201701649-3bb7d698-abec-4d5f-ac30-ccc4d7bafcd4.svg#gh-dark-mode-only" alt="Master CSS" width="100%">
|
|
6
|
+
<img src="https://user-images.githubusercontent.com/33840671/201703010-77bf2373-9899-40cc-98f5-30cf9b546941.svg#gh-light-mode-only" alt="Master CSS" width="100%">
|
|
6
7
|
</p>
|
|
8
|
+
<p align="center"><!-- package.description -->A Virtual CSS language with enhanced syntax ~15KB<!----></p>
|
|
9
|
+
|
|
7
10
|
<p align="center">
|
|
8
|
-
<
|
|
11
|
+
<a aria-label="NPM Version" href="https://www.npmjs.com/package/@master/css#gh-dark-mode-only">
|
|
12
|
+
<img alt="NPM Version" src="https://img.shields.io/npm/v/@master/css?color=212022&label=&style=for-the-badge"/>
|
|
13
|
+
</a>
|
|
14
|
+
<a aria-label="NPM Version" href="https://www.npmjs.com/package/@master/css#gh-light-mode-only">
|
|
15
|
+
<img alt="NPM Version" src="https://img.shields.io/npm/v/@master/css?color=f6f7f8&label=&style=for-the-badge"/>
|
|
16
|
+
</a>
|
|
17
|
+
<a aria-label="License" href="https://github.com/master-co/css/blob/main/LICENSE#gh-dark-mode-only">
|
|
18
|
+
<img alt="NPM" src="https://img.shields.io/npm/l/@master/css?color=212022&label=%20&style=for-the-badge">
|
|
19
|
+
</a>
|
|
20
|
+
<a aria-label="License" href="https://github.com/master-co/css/blob/main/LICENSE#gh-light-mode-only">
|
|
21
|
+
<img alt="NPM" src="https://img.shields.io/npm/l/@master/css?color=f6f7f8&label=%20&style=for-the-badge">
|
|
22
|
+
</a>
|
|
23
|
+
<a aria-label="NPM Package" href="https://www.jsdelivr.com/package/npm/@master/css#gh-dark-mode-only">
|
|
24
|
+
<img alt="jsDelivr hits (npm scoped)" src="https://img.shields.io/jsdelivr/npm/hm/@master/css?color=212022&label=%20&logo=jsdelivr&style=for-the-badge">
|
|
25
|
+
</a>
|
|
26
|
+
<a aria-label="NPM Package" href="https://www.jsdelivr.com/package/npm/@master/css#gh-light-mode-only">
|
|
27
|
+
<img alt="jsDelivr hits (npm scoped)" src="https://img.shields.io/jsdelivr/npm/hm/@master/css?color=f6f7f8&label=%20&logo=jsdelivr&style=for-the-badge">
|
|
28
|
+
</a>
|
|
29
|
+
<a aria-label="NPM Package" href="https://www.npmjs.com/package/@master/css#gh-dark-mode-only">
|
|
30
|
+
<img alt="npm" src="https://img.shields.io/npm/dm/@master/css?color=212022&label=%20&logo=npm&style=for-the-badge">
|
|
31
|
+
</a>
|
|
32
|
+
<a aria-label="NPM Package" href="https://www.npmjs.com/package/@master/css#gh-light-mode-only">
|
|
33
|
+
<img alt="npm" src="https://img.shields.io/npm/dm/@master/css?color=f6f7f8&label=%20&logo=npm&style=for-the-badge">
|
|
34
|
+
</a>
|
|
35
|
+
<a aria-label="Discord Community" href="https://discord.gg/sZNKpAAAw6#gh-dark-mode-only">
|
|
36
|
+
<img alt="Discord" src="https://img.shields.io/discord/917780624314613760?color=212022&label=%20&logo=discord&style=for-the-badge"/>
|
|
37
|
+
</a>
|
|
38
|
+
<a aria-label="Discord Community" href="https://discord.gg/sZNKpAAAw6#gh-light-mode-only">
|
|
39
|
+
<img alt="Discord" src="https://img.shields.io/discord/917780624314613760?color=f6f7f8&label=%20&logo=discord&style=for-the-badge"/>
|
|
40
|
+
</a>
|
|
41
|
+
<a aria-label="Follow @mastercorg" href="https://twitter.com/mastercorg#gh-dark-mode-only">
|
|
42
|
+
<img alt="Twitter" src="https://img.shields.io/static/v1?label=%20&message=twitter&color=212022&logo=twitter&style=for-the-badge">
|
|
43
|
+
</a>
|
|
44
|
+
<a aria-label="Follow @mastercorg" href="https://twitter.com/mastercorg#gh-light-mode-only">
|
|
45
|
+
<img alt="Twitter" src="https://img.shields.io/static/v1?label=%20&message=twitter&color=f6f7f8&logo=twitter&style=for-the-badge">
|
|
46
|
+
</a>
|
|
47
|
+
<a aria-label="Circle CI" href="https://circleci.com/gh/master-co/workflows/css/tree/main#gh-dark-mode-only">
|
|
48
|
+
<img alt="CircleCI" src="https://img.shields.io/circleci/build/gh/master-co/css?color=212022&label=%20&logo=circleci&style=for-the-badge">
|
|
49
|
+
</a>
|
|
50
|
+
<a aria-label="Circle CI" href="https://circleci.com/gh/master-co/workflows/css/tree/main#gh-light-mode-only">
|
|
51
|
+
<img alt="CircleCI" src="https://img.shields.io/circleci/build/gh/master-co/css?color=f6f7f8&label=%20&logo=circleci&style=for-the-badge&&logoColor=000">
|
|
52
|
+
</a>
|
|
9
53
|
</p>
|
|
10
|
-
<p align="center"><!-- package.description -->A Virtual CSS language with enhanced syntax. ~13KB<!----></p>
|
|
11
54
|
|
|
12
|
-
[](https://github.com/master-co/css/blob/main/LICENSE)
|
|
13
|
-
[](https://www.npmjs.com/package/@master/css)
|
|
14
|
-
[](https://www.jsdelivr.com/package/npm/@master/css 'hits (per month)')
|
|
15
|
-
[](https://unpkg.com/@master/css 'brotli package size (without dependencies)')
|
|
16
|
-
[](https://css.master.co)
|
|
17
|
-
[](https://github.com/master-co/css)
|
|
18
|
-
[](https://discord.gg/sZNKpAAAw6)
|
|
19
|
-
[](https://circleci.com/gh/master-co/workflows/css/tree/main)
|
|
20
55
|
</div>
|
|
21
56
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<style>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
</
|
|
76
|
-
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
```html
|
|
96
|
-
<script src="https://cdn.master.co/css"></script>
|
|
97
|
-
```
|
|
98
|
-
Now, start styling HTML with Master CSS. 🎉
|
|
99
|
-
```html
|
|
100
|
-
<h1 class="font:40 font:heavy italic m:50 text:center">Hello World</h1>
|
|
101
|
-
```
|
|
102
|
-
To learn more, check out the [Syntax tutorial](https://docs.master.co/css/syntax-tutorial) documentation.
|
|
103
|
-
|
|
104
|
-
# Developer Tools
|
|
105
|
-
- [Master CSS Language Service](https://marketplace.visualstudio.com/items?itemName=masterco.master-css-language-service) - A Visual Studio Code extension for Master CSS. Provides code-completion and syntax highlighting.
|
|
106
|
-
|
|
107
|
-
# Inspiration
|
|
57
|
+
## Documentation
|
|
58
|
+
|
|
59
|
+
Visit [css.master.co](https://css.master.co) to view the full documentation.
|
|
60
|
+
|
|
61
|
+
## Getting Started
|
|
62
|
+
|
|
63
|
+
Check out the [guides](https://css.master.co/docs/guides) to get started quickly with Master CSS.
|
|
64
|
+
|
|
65
|
+
## Ecosystem
|
|
66
|
+
|
|
67
|
+
<table layout="fixed">
|
|
68
|
+
<tr>
|
|
69
|
+
<th width="250px" align="left">Master CSS</th>
|
|
70
|
+
<th width="800px" align="left">Introduction</th>
|
|
71
|
+
<th width="250px">Changelog</th>
|
|
72
|
+
</tr>
|
|
73
|
+
<tr>
|
|
74
|
+
<th align="left" colspan="3">Packages</th>
|
|
75
|
+
</tr>
|
|
76
|
+
<tr>
|
|
77
|
+
<th align="left"><a href="https://github.com/master-co/css/tree/beta/packages/css">css</a></th>
|
|
78
|
+
<td>The core engine of the Master CSS language</td>
|
|
79
|
+
<td><a href="https://github.com/master-co/css/tree/beta/packages/css/CHANGELOG.md"><img src="https://img.shields.io/npm/v/@master/css?color=212022&label=&style=for-the-badge" alt="Release Notes" valign="middle"/></a></td>
|
|
80
|
+
</tr>
|
|
81
|
+
<tr>
|
|
82
|
+
<th align="left"><a href="https://github.com/master-co/css/tree/beta/packages/compiler">css.compiler</a></th>
|
|
83
|
+
<td>Ahead-of-time compiler for Master CSS</td>
|
|
84
|
+
<td><a href="https://github.com/master-co/css/tree/beta/packages/compiler/CHANGELOG.md"><img src="https://img.shields.io/npm/v/@master/css.compiler?color=212022&label=&style=for-the-badge" alt="Release Notes" valign="middle"/></a></td>
|
|
85
|
+
</tr>
|
|
86
|
+
<tr>
|
|
87
|
+
<th align="left"><a href="https://github.com/master-co/css/tree/beta/packages/vite">css.vite</a></th>
|
|
88
|
+
<td>A vite plugin that integrates with the AOT compilation of Master CSS</td>
|
|
89
|
+
<td><a href="https://github.com/master-co/css/tree/beta/packages/vite/CHANGELOG.md"><img src="https://img.shields.io/npm/v/@master/css.vite?color=212022&label=&style=for-the-badge" alt="Release Notes" valign="middle"/></a></td>
|
|
90
|
+
</tr>
|
|
91
|
+
<tr>
|
|
92
|
+
<th align="left"><a href="https://github.com/master-co/css/tree/beta/packages/webpack">css.webpack</a></th>
|
|
93
|
+
<td>A webpack plugin that integrates with the AOT compilation of Master CSS</td>
|
|
94
|
+
<td><a href="https://github.com/master-co/css/tree/beta/packages/webpack/CHANGELOG.md"><img src="https://img.shields.io/npm/v/@master/css.webpack?color=212022&label=&style=for-the-badge" alt="Release Notes" valign="middle"/></a></td>
|
|
95
|
+
</tr>
|
|
96
|
+
<tr>
|
|
97
|
+
<th align="left"><a href="https://github.com/master-co/css/tree/beta/packages/react">css.react</a></th>
|
|
98
|
+
<td>React hooks for Master CSS</td>
|
|
99
|
+
<td><a href="https://github.com/master-co/css/tree/beta/packages/react/CHANGELOG.md"><img src="https://img.shields.io/npm/v/@master/css.react?color=212022&label=&style=for-the-badge" alt="Release Notes" valign="middle"/></a></td>
|
|
100
|
+
</tr>
|
|
101
|
+
<tr>
|
|
102
|
+
<th align="left"><a href="https://github.com/master-co/css/tree/beta/packages/normal.css">normal.css</a></th>
|
|
103
|
+
<td>Normalize browser's styles</td>
|
|
104
|
+
<td><a href="https://github.com/master-co/css/tree/beta/packages/normal.css/CHANGELOG.md"><img src="https://img.shields.io/npm/v/@master/normal.css?color=212022&label=&style=for-the-badge" alt="Release Notes" valign="middle"/></a></td>
|
|
105
|
+
</tr>
|
|
106
|
+
<tr>
|
|
107
|
+
<th align="left"><a href="https://github.com/master-co/css/tree/beta/packages/keyframes.css">keyframes.css</a></th>
|
|
108
|
+
<td>Simple and useful CSS keyframes</td>
|
|
109
|
+
<td><a href="https://github.com/master-co/css/tree/beta/packages/keyframes.css/CHANGELOG.md"><img src="https://img.shields.io/npm/v/@master/keyframes.css?color=212022&label=&style=for-the-badge" alt="Release Notes" valign="middle"/></a></td>
|
|
110
|
+
</tr>
|
|
111
|
+
<tr>
|
|
112
|
+
<th align="left" colspan="3">Related Packages</th>
|
|
113
|
+
</tr>
|
|
114
|
+
<tr>
|
|
115
|
+
<th align="left"><a href="https://github.com/master-co/style-element/tree/beta/packages/react">style-element.react</a></th>
|
|
116
|
+
<td>Quickly create reusable React elements driven by class names</td>
|
|
117
|
+
<td><a href="https://github.com/master-co/css/tree/beta/packages/react/CHANGELOG.md"><img src="https://img.shields.io/npm/v/@master/style-element.react?color=212022&label=&style=for-the-badge" alt="Release Notes" valign="middle"/></a></td>
|
|
118
|
+
</tr>
|
|
119
|
+
<tr>
|
|
120
|
+
<th align="left" colspan="3">Extensions</th>
|
|
121
|
+
</tr>
|
|
122
|
+
<tr>
|
|
123
|
+
<th align="left"><a href="https://github.com/master-co/css-language-service">Language Service<br><sub>Visual Studio Code</sub></a></th>
|
|
124
|
+
<td>Code completion, syntax highlighting, CSS hover preview, inline color decorators</td>
|
|
125
|
+
<td><a href="https://github.com/master-co/css-language-service/releases"><img src="https://img.shields.io/github/v/release/master-co/css-language-service?color=212022&label=&style=for-the-badge" alt="Release Notes" valign="middle"/></a></td>
|
|
126
|
+
</tr>
|
|
127
|
+
</table>
|
|
128
|
+
|
|
129
|
+
## Inspiration
|
|
108
130
|
Some of our core concepts and designs are inspired by these giants.
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
|
|
112
|
-
# Related
|
|
113
|
-
- [@master/css.react](https://github.com/master-co/css.react) - React hooks for Master CSS
|
|
114
|
-
- [@master/css-compiler](https://github.com/master-co/css-compiler) - Compile Master CSS ahead of time with zero-configuration integration with build tools
|
|
115
|
-
- [@master/normal.css](https://github.com/master-co/normal.css) - Normalize browser's styles. ~1KB
|
|
116
|
-
- [@master/keyframes.css](https://github.com/master-co/keyframes.css) - Simple and useful CSS keyframes. ~0.4KB
|
|
117
|
-
- [@master/style-element.react](https://github.com/master-co/style-element.react) - Quickly create styled React elements with conditional class names. ~800B
|
|
131
|
+
- The concept of enhanced syntax is inspired by [SASS](https://sass-lang.com/) and [Typescript](https://www.typescriptlang.org/).
|
|
132
|
+
- The concept of __Virtual CSS__ is inspired by the [Virtual DOM](https://reactjs.org/docs/faq-internals.html).
|
package/dist/apis/extend.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type ExpandDeep<T> = T extends Record<string | number | symbol, unknown> ? {
|
|
2
2
|
[K in keyof T]: ExpandDeep<T[K]>;
|
|
3
3
|
} : T extends Array<infer E> ? Array<ExpandDeep<E>> : T;
|
|
4
4
|
export default function extend<T extends Record<string, any>>(object: T, ...otherObjects: any[]): ExpandDeep<any>;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -3,19 +3,19 @@ import Rule from '../rule';
|
|
|
3
3
|
import MasterCSS from '../css';
|
|
4
4
|
declare const config: Config;
|
|
5
5
|
export default config;
|
|
6
|
-
|
|
6
|
+
type Colors = {
|
|
7
7
|
[key: string]: string | Colors;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type Breakpoints = {
|
|
10
10
|
[key: string]: number | Breakpoints;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type Selectors = {
|
|
13
13
|
[key: string]: string | string[] | Selectors;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
type Semantics = {
|
|
16
16
|
[key: string]: string | Record<string, string | number | Semantics>;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
type Values = {
|
|
19
19
|
[key: string]: string | number | Values;
|
|
20
20
|
};
|
|
21
21
|
export interface Config {
|