@master/css 2.0.0-beta.17 → 2.0.0-beta.170
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 +113 -109
- package/dist/bin/index.bundle.js +45 -0
- package/dist/bin/index.d.ts +2 -0
- package/dist/config/animations.d.ts +8 -0
- package/dist/config/classes.d.ts +3 -0
- package/dist/config/colors.d.ts +4 -24
- package/dist/config/functions.d.ts +9 -0
- package/dist/config/important.d.ts +2 -0
- package/dist/config/index.d.ts +35 -25
- package/dist/config/media-queries.d.ts +3 -0
- package/dist/config/override.d.ts +2 -0
- package/dist/config/root-size.d.ts +2 -2
- package/dist/config/rules.d.ts +278 -3
- package/dist/config/scope.d.ts +2 -0
- package/dist/config/selectors.d.ts +4 -18
- package/dist/config/semantics.d.ts +8 -81
- package/dist/config/theme-driver.d.ts +3 -0
- package/dist/config/values.d.ts +2 -125
- package/dist/config/viewports.d.ts +5 -0
- package/dist/constants/config-esm-text.d.ts +1 -0
- package/dist/constants/config-text.d.ts +1 -0
- package/dist/constants/config-ts-text.d.ts +1 -0
- package/dist/constants/selector-symbols.d.ts +1 -0
- package/dist/constants/start-symbol.d.ts +2 -1
- package/dist/core.d.ts +95 -0
- package/dist/functions/extract-classes-from-html.d.ts +5 -0
- package/dist/functions/generate-from-classes.d.ts +8 -0
- package/dist/functions/generate-from-html.d.ts +8 -0
- package/dist/functions/init-runtime.d.ts +9 -0
- package/dist/functions/render-html.d.ts +8 -0
- package/dist/index.browser.bundle.js +1 -0
- package/dist/index.browser.d.ts +6 -1
- package/dist/index.bundle.js +44 -0
- package/dist/index.bundle.mjs +44 -0
- package/dist/index.d.ts +13 -21
- package/dist/polyfills/css-escape.d.ts +0 -1
- package/dist/rule.d.ts +59 -46
- package/dist/types/css-properties.d.ts +4 -0
- package/dist/utils/camel-2-kebab.d.ts +1 -0
- package/dist/utils/is-plain-object.d.ts +1 -1
- package/dist/utils/parse-rule-value.d.ts +5 -0
- package/package.json +1 -162
- package/LICENSE +0 -21
- package/dist/apis/extend.d.ts +0 -5
- package/dist/apis/render-from-html.d.ts +0 -3
- package/dist/apis/render-into-html.d.ts +0 -3
- package/dist/apis/render.d.ts +0 -3
- package/dist/config/breakpoints.d.ts +0 -13
- package/dist/config/scheme.d.ts +0 -7
- package/dist/config/themes.d.ts +0 -2
- package/dist/css.d.ts +0 -80
- package/dist/index.browser.js +0 -2
- package/dist/index.browser.js.map +0 -7
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -7
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +0 -7
- package/dist/rules/accent-color.d.ts +0 -7
- package/dist/rules/align-content.d.ts +0 -6
- package/dist/rules/align-items.d.ts +0 -6
- package/dist/rules/align-self.d.ts +0 -6
- package/dist/rules/animation-delay.d.ts +0 -7
- package/dist/rules/animation-direction.d.ts +0 -6
- package/dist/rules/animation-duration.d.ts +0 -7
- package/dist/rules/animation-fill-mode.d.ts +0 -6
- package/dist/rules/animation-iteration-count.d.ts +0 -7
- package/dist/rules/animation-name.d.ts +0 -6
- package/dist/rules/animation-play-state.d.ts +0 -6
- package/dist/rules/animation-timing-function.d.ts +0 -6
- package/dist/rules/animation.d.ts +0 -8
- package/dist/rules/appearance.d.ts +0 -5
- package/dist/rules/aspect-radio.d.ts +0 -7
- package/dist/rules/backdrop-filter.d.ts +0 -11
- package/dist/rules/background-attachment.d.ts +0 -6
- package/dist/rules/background-blend-mode.d.ts +0 -5
- package/dist/rules/background-clip.d.ts +0 -9
- package/dist/rules/background-color.d.ts +0 -8
- package/dist/rules/background-image.d.ts +0 -7
- package/dist/rules/background-origin.d.ts +0 -6
- package/dist/rules/background-position.d.ts +0 -7
- package/dist/rules/background-repeat.d.ts +0 -6
- package/dist/rules/background-size.d.ts +0 -6
- package/dist/rules/background.d.ts +0 -8
- package/dist/rules/border-collapse.d.ts +0 -6
- package/dist/rules/border-color.d.ts +0 -11
- package/dist/rules/border-image-outset.d.ts +0 -5
- package/dist/rules/border-image-repeat.d.ts +0 -6
- package/dist/rules/border-image-slice.d.ts +0 -6
- package/dist/rules/border-image-source.d.ts +0 -6
- package/dist/rules/border-image-width.d.ts +0 -6
- package/dist/rules/border-image.d.ts +0 -6
- package/dist/rules/border-radius.d.ts +0 -9
- package/dist/rules/border-spacing.d.ts +0 -5
- package/dist/rules/border-style.d.ts +0 -9
- package/dist/rules/border-width.d.ts +0 -9
- package/dist/rules/border.d.ts +0 -10
- package/dist/rules/box-decoration-break.d.ts +0 -9
- package/dist/rules/box-shadow.d.ts +0 -7
- package/dist/rules/box-sizing.d.ts +0 -6
- package/dist/rules/break-after.d.ts +0 -5
- package/dist/rules/break-before.d.ts +0 -5
- package/dist/rules/break-inside.d.ts +0 -5
- package/dist/rules/caret-color.d.ts +0 -7
- package/dist/rules/clear.d.ts +0 -5
- package/dist/rules/clip-path.d.ts +0 -6
- package/dist/rules/color.d.ts +0 -8
- package/dist/rules/column-span.d.ts +0 -6
- package/dist/rules/columns.d.ts +0 -8
- package/dist/rules/contain.d.ts +0 -5
- package/dist/rules/content.d.ts +0 -5
- package/dist/rules/counter-increment.d.ts +0 -6
- package/dist/rules/cursor.d.ts +0 -5
- package/dist/rules/cx.d.ts +0 -6
- package/dist/rules/cy.d.ts +0 -6
- package/dist/rules/direction.d.ts +0 -5
- package/dist/rules/display.d.ts +0 -6
- package/dist/rules/fill.d.ts +0 -7
- package/dist/rules/filter.d.ts +0 -8
- package/dist/rules/flex-basis.d.ts +0 -5
- package/dist/rules/flex-direction.d.ts +0 -6
- package/dist/rules/flex-grow.d.ts +0 -6
- package/dist/rules/flex-shrink.d.ts +0 -6
- package/dist/rules/flex-wrap.d.ts +0 -6
- package/dist/rules/flex.d.ts +0 -7
- package/dist/rules/float.d.ts +0 -5
- package/dist/rules/font-family.d.ts +0 -6
- package/dist/rules/font-size.d.ts +0 -6
- package/dist/rules/font-smoothing.d.ts +0 -9
- package/dist/rules/font-style.d.ts +0 -7
- package/dist/rules/font-variant-numeric.d.ts +0 -6
- package/dist/rules/font-weight.d.ts +0 -7
- package/dist/rules/font.d.ts +0 -8
- package/dist/rules/gap.d.ts +0 -9
- package/dist/rules/grid-area.d.ts +0 -7
- package/dist/rules/grid-auto-columns.d.ts +0 -6
- package/dist/rules/grid-auto-flow.d.ts +0 -6
- package/dist/rules/grid-auto-rows.d.ts +0 -5
- package/dist/rules/grid-column-end.d.ts +0 -7
- package/dist/rules/grid-column-start.d.ts +0 -7
- package/dist/rules/grid-column.d.ts +0 -9
- package/dist/rules/grid-columns.d.ts +0 -10
- package/dist/rules/grid-row-end.d.ts +0 -6
- package/dist/rules/grid-row-start.d.ts +0 -6
- package/dist/rules/grid-row.d.ts +0 -9
- package/dist/rules/grid-rows.d.ts +0 -9
- package/dist/rules/grid-template-areas.d.ts +0 -5
- package/dist/rules/grid-template-columns.d.ts +0 -6
- package/dist/rules/grid-template-rows.d.ts +0 -5
- package/dist/rules/grid-template.d.ts +0 -6
- package/dist/rules/grid.d.ts +0 -6
- package/dist/rules/group.d.ts +0 -9
- package/dist/rules/height.d.ts +0 -6
- package/dist/rules/inset.d.ts +0 -9
- package/dist/rules/isolation.d.ts +0 -5
- package/dist/rules/justify-content.d.ts +0 -6
- package/dist/rules/justify-items.d.ts +0 -6
- package/dist/rules/justify-self.d.ts +0 -6
- package/dist/rules/letter-spacing.d.ts +0 -7
- package/dist/rules/line-clamp.d.ts +0 -9
- package/dist/rules/line-height.d.ts +0 -7
- package/dist/rules/lines.d.ts +0 -9
- package/dist/rules/list-style-image.d.ts +0 -6
- package/dist/rules/list-style-position.d.ts +0 -6
- package/dist/rules/list-style-type.d.ts +0 -6
- package/dist/rules/list-style.d.ts +0 -6
- package/dist/rules/margin.d.ts +0 -9
- package/dist/rules/mask-image.d.ts +0 -8
- package/dist/rules/max-height.d.ts +0 -6
- package/dist/rules/max-width.d.ts +0 -6
- package/dist/rules/min-height.d.ts +0 -6
- package/dist/rules/min-width.d.ts +0 -6
- package/dist/rules/mix-blend-mode.d.ts +0 -6
- package/dist/rules/object-fit.d.ts +0 -6
- package/dist/rules/object-position.d.ts +0 -6
- package/dist/rules/opacity.d.ts +0 -6
- package/dist/rules/order.d.ts +0 -7
- package/dist/rules/outline-color.d.ts +0 -7
- package/dist/rules/outline-offset.d.ts +0 -5
- package/dist/rules/outline-style.d.ts +0 -6
- package/dist/rules/outline-width.d.ts +0 -6
- package/dist/rules/outline.d.ts +0 -7
- package/dist/rules/overflow.d.ts +0 -9
- package/dist/rules/overscroll-behavior.d.ts +0 -8
- package/dist/rules/padding.d.ts +0 -9
- package/dist/rules/place-content.d.ts +0 -6
- package/dist/rules/place-items.d.ts +0 -6
- package/dist/rules/place-self.d.ts +0 -6
- package/dist/rules/placement.d.ts +0 -8
- package/dist/rules/pointer-events.d.ts +0 -5
- package/dist/rules/position.d.ts +0 -5
- package/dist/rules/quotes.d.ts +0 -5
- package/dist/rules/resize.d.ts +0 -5
- package/dist/rules/rx.d.ts +0 -6
- package/dist/rules/ry.d.ts +0 -6
- package/dist/rules/scroll-behavior.d.ts +0 -5
- package/dist/rules/scroll-margin.d.ts +0 -9
- package/dist/rules/scroll-padding.d.ts +0 -9
- package/dist/rules/scroll-snap-align.d.ts +0 -6
- package/dist/rules/scroll-snap-stop.d.ts +0 -6
- package/dist/rules/scroll-snap-type.d.ts +0 -6
- package/dist/rules/shape-image-threshold.d.ts +0 -6
- package/dist/rules/shape-margin.d.ts +0 -6
- package/dist/rules/shape-outside.d.ts +0 -6
- package/dist/rules/spacing.d.ts +0 -9
- package/dist/rules/stroke-dasharray.d.ts +0 -5
- package/dist/rules/stroke-dashoffset.d.ts +0 -5
- package/dist/rules/stroke-width.d.ts +0 -6
- package/dist/rules/stroke.d.ts +0 -6
- package/dist/rules/table-layout.d.ts +0 -5
- package/dist/rules/text-align.d.ts +0 -6
- package/dist/rules/text-decoration-color.d.ts +0 -7
- package/dist/rules/text-decoration-line.d.ts +0 -6
- package/dist/rules/text-decoration-style.d.ts +0 -6
- package/dist/rules/text-decoration-thickness.d.ts +0 -7
- package/dist/rules/text-decoration.d.ts +0 -8
- package/dist/rules/text-fill-color.d.ts +0 -10
- package/dist/rules/text-indent.d.ts +0 -5
- package/dist/rules/text-orientation.d.ts +0 -6
- package/dist/rules/text-overflow.d.ts +0 -6
- package/dist/rules/text-rendering.d.ts +0 -6
- package/dist/rules/text-shadow.d.ts +0 -6
- package/dist/rules/text-size.d.ts +0 -8
- package/dist/rules/text-stroke-color.d.ts +0 -10
- package/dist/rules/text-stroke-width.d.ts +0 -8
- package/dist/rules/text-stroke.d.ts +0 -8
- package/dist/rules/text-transform.d.ts +0 -6
- package/dist/rules/text-underline-offset.d.ts +0 -5
- package/dist/rules/touch-action.d.ts +0 -5
- package/dist/rules/transform-box.d.ts +0 -6
- package/dist/rules/transform-origin.d.ts +0 -7
- package/dist/rules/transform-style.d.ts +0 -6
- package/dist/rules/transform.d.ts +0 -9
- package/dist/rules/transition-delay.d.ts +0 -7
- package/dist/rules/transition-duration.d.ts +0 -7
- package/dist/rules/transition-property.d.ts +0 -6
- package/dist/rules/transition-timing-function.d.ts +0 -6
- package/dist/rules/transition.d.ts +0 -7
- package/dist/rules/user-drag.d.ts +0 -8
- package/dist/rules/user-select.d.ts +0 -8
- package/dist/rules/variable.d.ts +0 -9
- package/dist/rules/vertical-align.d.ts +0 -6
- package/dist/rules/visibility.d.ts +0 -5
- package/dist/rules/white-space.d.ts +0 -6
- package/dist/rules/width.d.ts +0 -6
- package/dist/rules/will-change.d.ts +0 -5
- package/dist/rules/word-break.d.ts +0 -6
- package/dist/rules/word-spacing.d.ts +0 -6
- package/dist/rules/writing-mode.d.ts +0 -6
- package/dist/rules/x.d.ts +0 -6
- package/dist/rules/y.d.ts +0 -6
- package/dist/rules/z-index.d.ts +0 -7
- package/dist/utils/get-border-props.d.ts +0 -3
- package/dist/utils/get-css-property-text.d.ts +0 -5
- package/dist/utils/normalize-css-calc-text.d.ts +0 -5
- package/dist/utils/parse-value-unit.d.ts +0 -2
- package/dist/utils/parse-value.d.ts +0 -6
- package/readme.md +0 -118
- /package/dist/{apis → functions}/fill-color-scale.d.ts +0 -0
package/dist/rules/stroke.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { MasterCSSConfig } from '../config';
|
|
2
|
-
import MasterCSSRule from '../rule';
|
|
3
|
-
export default class extends MasterCSSRule {
|
|
4
|
-
static id: string;
|
|
5
|
-
static matches: RegExp;
|
|
6
|
-
static propName: string;
|
|
7
|
-
static unit: string;
|
|
8
|
-
parseValue(value: string, { rootSize }: MasterCSSConfig): string;
|
|
9
|
-
}
|
package/dist/rules/variable.d.ts
DELETED
package/dist/rules/width.d.ts
DELETED
package/dist/rules/x.d.ts
DELETED
package/dist/rules/y.d.ts
DELETED
package/dist/rules/z-index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare function parseValue(token: string | number, defaultUnit?: string, colorsThemesMap?: Record<string, Record<string, Record<string, string>>>, values?: Record<string, string | number>, rootSize?: number, themes?: string[]): {
|
|
2
|
-
value: string;
|
|
3
|
-
unit: string;
|
|
4
|
-
unitToken: string;
|
|
5
|
-
colorMatched?: boolean;
|
|
6
|
-
};
|
package/readme.md
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
<br><br>
|
|
2
|
-
<div align="center">
|
|
3
|
-
|
|
4
|
-
<p align="center">
|
|
5
|
-
<img src="https://raw.githubusercontent.com/master-co/package/document/images/logo-and-text.svg" alt="logo" width="142">
|
|
6
|
-
</p>
|
|
7
|
-
<p align="center">
|
|
8
|
-
<b><!-- name -->CSS<!----></b>
|
|
9
|
-
</p>
|
|
10
|
-
<p align="center"><!-- package.description -->A Virtual CSS language with enhanced syntax. ~13KB<!----></p>
|
|
11
|
-
|
|
12
|
-
[](https://github.com/master-co/css/blob/main/LICENSE)
|
|
13
|
-
[](https://www.npmjs.com/package/@master/css)
|
|
14
|
-
[](https://bundlephobia.com/package/@master/css 'gzip bundle size (including dependencies)')
|
|
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
|
-
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-

|
|
24
|
-
|
|
25
|
-
- Visit [css.master.co](https://css.master.co) for full documentation.
|
|
26
|
-
- Browse our [discussion community](https://github.com/master-co/css/discussions).
|
|
27
|
-
- Join our [discord channel](https://discord.gg/sZNKpAAAw6).
|
|
28
|
-
- Follow our [twitter](https://twitter.com/mastercorg).
|
|
29
|
-
|
|
30
|
-
##### On this page
|
|
31
|
-
|
|
32
|
-
- [Features](#features)
|
|
33
|
-
- [Why Master CSS](#why-master-css)
|
|
34
|
-
- [Quick Start](#quick-start)
|
|
35
|
-
- [Developer Tools](#developer-tools)
|
|
36
|
-
- [Inspiration](#inspiration)
|
|
37
|
-
- [Related](#related)
|
|
38
|
-
|
|
39
|
-
# Features
|
|
40
|
-
Let's have a quick overview of the **groundbreaking features** of Master CSS:
|
|
41
|
-
|
|
42
|
-
- 🔥 A whole new **CSS language** instead of utilities/libraries.
|
|
43
|
-
- 🔓 Write CSS properties, functions, selectors and even media queries directly in `class="..."`.
|
|
44
|
-
- 🧠 Automatically generate corresponding CSS rules based on class names.
|
|
45
|
-
- 💖 With enhanced CSS syntax, you can **build UIs with less code**.
|
|
46
|
-
- ⚡️ Directly use **performant JIT in production**. **~13KB**
|
|
47
|
-
- 🧬 [An enhanced and structured CSS syntax](https://docs.master.co/css/syntax-tutorial) for class names.
|
|
48
|
-
- 🌈 [A forerunner to syntax highlighting](https://docs.master.co/css/why-master-css#a-forerunner-to-syntax-highlighting) for class names.
|
|
49
|
-
- ✨ [Hybrid Rendering](https://docs.master.co/css/hybrid-rendering) that allows you to **pre-generate CSS from HTML on the server side**, and then continue to **use JIT on the client side**.
|
|
50
|
-
- ✨ [Group Styles](https://docs.master.co/css/syntax-tutorial#group-styles) that allows you to extract the same selectors and media query styles and make it short.
|
|
51
|
-
- ✨ [Reactive Styles](https://docs.master.co/css/syntax-tutorial#style-an-element-based-on-target-state) that allows you to style an element based on parent/sibling state.
|
|
52
|
-
|
|
53
|
-
To learn more, check out the [documentation](https://docs.master.co/css/why-master-css).
|
|
54
|
-
|
|
55
|
-
# [Why Master CSS](https://docs.master.co/css/why-master-css)
|
|
56
|
-
A brief introduction starts by giving you an understanding of **markup-driven CSS**.
|
|
57
|
-
|
|
58
|
-
😐 Traditional
|
|
59
|
-
```html
|
|
60
|
-
<style>
|
|
61
|
-
.home-section {
|
|
62
|
-
background-color: blue;
|
|
63
|
-
padding: 2rem;
|
|
64
|
-
text-align: center;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.home-section:hover {
|
|
68
|
-
background-color: red;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@media (min-width: 1024px) {
|
|
72
|
-
.home-section {
|
|
73
|
-
padding: 3rem;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
</style>
|
|
77
|
-
|
|
78
|
-
<section class="home-section">...</section>
|
|
79
|
-
```
|
|
80
|
-
🤩 Now, refactor it with a whole new CSS language to make it easier. ↓ 86% code
|
|
81
|
-
```html
|
|
82
|
-
<section class="bg:blue bg:red:hover p:32 p:48@md text:center">...</section>
|
|
83
|
-
```
|
|
84
|
-
To learn more, check out the [Why Master CSS](https://docs.master.co/css/why-master-css) documentation.
|
|
85
|
-
|
|
86
|
-
# Quick Start
|
|
87
|
-
This is a quick start guide, check out the [full setup guide](https://docs.master.co/css/setup) to integrate with your build tools and frameworks.
|
|
88
|
-
|
|
89
|
-
```shell
|
|
90
|
-
npm install @master/css
|
|
91
|
-
```
|
|
92
|
-
```js
|
|
93
|
-
import '@master/css';
|
|
94
|
-
```
|
|
95
|
-
or use a CDN
|
|
96
|
-
```html
|
|
97
|
-
<script src="https://cdn.master.co/css"></script>
|
|
98
|
-
```
|
|
99
|
-
Now, start styling HTML with Master CSS. 🎉
|
|
100
|
-
```html
|
|
101
|
-
<h1 class="font:40 font:heavy italic m:50 text:center">Hello World</h1>
|
|
102
|
-
```
|
|
103
|
-
To learn more, check out the [Syntax tutorial](https://docs.master.co/css/syntax-tutorial) documentation.
|
|
104
|
-
|
|
105
|
-
# Developer Tools
|
|
106
|
-
- [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.
|
|
107
|
-
|
|
108
|
-
# Inspiration
|
|
109
|
-
Some of our core concepts and designs are inspired by these giants.
|
|
110
|
-
- __Language__ - Master is a language, but it was originally inspired by [ACSS](https://acss.io/)'s concept of atomic classes.
|
|
111
|
-
- __Virtual CSS__ - Difference algorithms, virtual models, etc. are inspired by [Virtual DOM](https://reactjs.org/docs/faq-internals.html).
|
|
112
|
-
|
|
113
|
-
# Related
|
|
114
|
-
- [@master/css.react](https://github.com/master-co/css.react) - React hooks for Master CSS
|
|
115
|
-
- [@master/css-compiler](https://github.com/master-co/css-compiler) - Compile Master CSS ahead of time with zero-configuration integration with build tools
|
|
116
|
-
- [@master/normal.css](https://github.com/master-co/normal.css) - Normalize browser's styles. ~1KB
|
|
117
|
-
- [@master/keyframes.css](https://github.com/master-co/keyframes.css) - Simple and useful CSS keyframes. ~0.4KB
|
|
118
|
-
- [@master/style-element.react](https://github.com/master-co/style-element.react) - Quickly create styled React elements with conditional class names. ~800B
|
|
File without changes
|