@plumeria/core 0.7.19 → 0.7.20
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 +1 -1
- package/readme.md +12 -5
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @plumeria/core
|
|
2
2
|
|
|
3
|
+
Plumeria is a CSS-in-JS built using [**zss-engine**](https://www.npmjs.com/package/zss-engine) and [**zss-utils**](https://www.npmjs.com/package/zss-utils) that provides a speedy development cycle.
|
|
4
|
+
|
|
3
5
|
## Installation
|
|
4
6
|
|
|
5
7
|
To start using Plumeria, install the following two packages:
|
|
@@ -11,15 +13,20 @@ npm install --save @plumeria/core
|
|
|
11
13
|
### Compiler
|
|
12
14
|
|
|
13
15
|
To compile `@plumeria/core`, for example, to use `npx css`, install
|
|
14
|
-
[`@plumeria/compiler`](https://www.npmjs.com/package/@plumeria/compiler) for static extraction through the
|
|
16
|
+
[`@plumeria/compiler`](https://www.npmjs.com/package/@plumeria/compiler) for static extraction through the Command Line.
|
|
17
|
+
Also, it can be easily integrated into the build process.
|
|
18
|
+
|
|
19
|
+
The compiler is built using [**SWC**](https://swc.rs/) and performs high-speed transpilation in memory.
|
|
15
20
|
|
|
16
21
|
```sh
|
|
17
22
|
npm install --save-dev @plumeria/compiler
|
|
18
23
|
```
|
|
19
24
|
|
|
20
|
-
###
|
|
25
|
+
### Static StyleSheet
|
|
21
26
|
|
|
22
27
|
Import stylesheet in your application's entry point.
|
|
28
|
+
CSS for all APIs is collected here.
|
|
29
|
+
|
|
23
30
|
Applies the static stylesheet for production environments.
|
|
24
31
|
|
|
25
32
|
```ts
|
|
@@ -68,7 +75,7 @@ const styles = css.create({
|
|
|
68
75
|
### css.global()
|
|
69
76
|
|
|
70
77
|
This API lets you define global CSS.
|
|
71
|
-
|
|
78
|
+
Due to restrictions on avoiding collisions in HTML selectors, css.global() is designed to throw a compilation error if written more than once.
|
|
72
79
|
|
|
73
80
|
```ts
|
|
74
81
|
css.global({
|
|
@@ -178,8 +185,8 @@ Mixes #000 or #FFF into the color.
|
|
|
178
185
|
The first argument takes the color and the second argument takes the same value as opacity (string % or number).
|
|
179
186
|
|
|
180
187
|
```ts
|
|
181
|
-
css.colors.darken('skyblue', 0.12)
|
|
182
|
-
css.colors.
|
|
188
|
+
color: css.colors.darken('skyblue', 0.12),
|
|
189
|
+
color: css.colors.lighten('navy', 0.6),
|
|
183
190
|
```
|
|
184
191
|
|
|
185
192
|
## Linter
|