klenod-plugin-css 0.0.1

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9c9cfafc24c820a6f5f23bb38a1586d643a765d383de21a6640edc187f9b939b
4
+ data.tar.gz: ec953fe2d93cbeeddd9bb7897225616fd04251d540c74853fc81997200b5f02c
5
+ SHA512:
6
+ metadata.gz: 63d1050aef1c652120e348d7b5b3fc5fe564482563acdd4ef0dcb50de0b6e25679a1e143993be673492efa5df8ccd55c248482ca9a2dad1406ebb15600214416
7
+ data.tar.gz: dae567a4cc4be1bcdc2fe25a0ea5aaf0b6d8a6b0719b83d58052d1aa677c95950ee060c88f528cde3d963e187ea153b42afcbe1edc5d709a3505d3c0840a3879
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # klenod-plugin-css
2
+
3
+ CSS asset and CSS Modules plugin for
4
+ [Klenod](https://github.com/aalin/klenod), powered by
5
+ [Lightning CSS](https://lightningcss.dev/).
6
+
7
+ ## Options
8
+
9
+ ```ruby
10
+ require "klenod/plugin/css"
11
+
12
+ Klenod::Build::Plugins::CSSPlugin.new(
13
+ source_maps: :development,
14
+ minify: false,
15
+ class_pattern: "[component].[local]?[hash]",
16
+ tag_pattern: "[component]_[local]?[hash]",
17
+ local_css_variables: false,
18
+ variable_pattern: "[component]-[local]?[hash]"
19
+ )
20
+ ```
21
+
22
+ - `source_maps:` accepts `false`, `true`, or `:development` (the default).
23
+ - `minify:` also minifies in development when `true`; build output is always
24
+ minified.
25
+ - `class_pattern:` and `tag_pattern:` control generated selector names.
26
+ - `local_css_variables:` enables CSS Modules dashed identifiers.
27
+ - `variable_pattern:` controls generated local variable names; the leading
28
+ `--` is added automatically.
29
+
30
+ ## Local CSS variables
31
+
32
+ CSS custom properties remain global by default. When
33
+ `local_css_variables: true`, declarations and ordinary references are scoped.
34
+ References can explicitly come from another CSS module or remain global:
35
+
36
+ ```css
37
+ .button {
38
+ background: var(--accent-color from "./vars.css");
39
+ color: var(--text-color from global);
40
+ }
41
+ ```