qss 0.1.0 → 0.1.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 +4 -4
- data/CHANGELOG.md +12 -1
- data/app/assets/javascripts/qss/qss-engine.js +1 -0
- data/app/assets/stylesheets/qss/qss_core.css +10 -0
- data/app/assets/stylesheets/qss/qss_core.scss +5 -0
- data/config/grammar.yml +1 -0
- data/exe/qss-core-render-check +5 -0
- data/lib/qss/qss_auditor.rb +2 -1
- data/lib/qss/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 66150ff6d5d7310f9fcdff3e694f321c3dce50ae18503caccd2a0792e4cce86a
|
|
4
|
+
data.tar.gz: 74f4ce6e564e503a967c85f5629e4d474813d45b2c0cc54dbe7ae7ed011aba2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1cdb64154903050a037a49e30587269f3113350d35288c313c12861b1bcba106811e2d263d96a7cab490ef57268f96bf4d7c96a0868670eaa4a68a17365c3622
|
|
7
|
+
data.tar.gz: 0c19536b299d641009e3560372b8784bf7de5e6d7a10006a26640e818601253dbcd187b82919689354033ac93b1e72c88b80488686a15953fe5debfc7bb78d31
|
data/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,18 @@
|
|
|
3
3
|
All notable changes to the qss gem. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
|
|
4
4
|
versions follow [Semantic Versioning](https://semver.org/) (before 1.0, minor versions may break the API).
|
|
5
5
|
|
|
6
|
-
## [
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## [0.1.1] - 2026-10-05
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- `contain-layout` and `qss-contain-layout` now have a rule (`contain: layout`) in `qss_core.css`. The README
|
|
12
|
+
documents the class for structural frames and the native auditor mandates it, but the stylesheet never defined it,
|
|
13
|
+
so a frame that satisfied the auditor received no containment. Anyone already using the class will now get layout
|
|
14
|
+
containment on those frames: check that absolutely and fixed-positioned descendants still position as expected.
|
|
15
|
+
Covered by a spec on the compiled stylesheet and by three checks in the browser render check (21 in total).
|
|
16
|
+
|
|
17
|
+
## [0.1.0] - 2026-09-25
|
|
7
18
|
|
|
8
19
|
First release, extracted from the Parapet project.
|
|
9
20
|
|
|
@@ -71908,6 +71908,16 @@ html, body {
|
|
|
71908
71908
|
object-fit: contain;
|
|
71909
71909
|
}
|
|
71910
71910
|
|
|
71911
|
+
/* Layout containment for structural frames: the class the README documents and the native auditor mandates on
|
|
71912
|
+
frames whose id names a structural word (header, nav, sidebar, ...). Both spellings the auditor accepts. */
|
|
71913
|
+
:is(#qss-canvas) .contain-layout {
|
|
71914
|
+
contain: layout;
|
|
71915
|
+
}
|
|
71916
|
+
|
|
71917
|
+
:is(#qss-canvas) .qss-contain-layout {
|
|
71918
|
+
contain: layout;
|
|
71919
|
+
}
|
|
71920
|
+
|
|
71911
71921
|
:is(#qss-canvas) .cover {
|
|
71912
71922
|
object-fit: cover;
|
|
71913
71923
|
}
|
|
@@ -411,6 +411,11 @@ $qss-scope: if($qss-portal-root == "", $qss-anchor, "#{$qss-anchor}, #{$qss-port
|
|
|
411
411
|
@include qss-dsl-boost(".grid") { display: grid; }
|
|
412
412
|
@include qss-dsl-boost(".table-fixed") { table-layout: fixed; }
|
|
413
413
|
@include qss-dsl-boost(".contain") { object-fit: contain; }
|
|
414
|
+
|
|
415
|
+
/* Layout containment for structural frames: the class the README documents and the native auditor mandates on
|
|
416
|
+
frames whose id names a structural word (header, nav, sidebar, ...). Both spellings the auditor accepts. */
|
|
417
|
+
@include qss-dsl-boost(".contain-layout") { contain: layout; }
|
|
418
|
+
@include qss-dsl-boost(".qss-contain-layout") { contain: layout; }
|
|
414
419
|
@include qss-dsl-boost(".cover") { object-fit: cover; }
|
|
415
420
|
|
|
416
421
|
/* Visual Atmosphere */
|
data/config/grammar.yml
CHANGED
data/exe/qss-core-render-check
CHANGED
|
@@ -30,6 +30,8 @@ HTML = <<~HTML
|
|
|
30
30
|
<div id="vertical" class="qss vertical"></div>
|
|
31
31
|
<div id="flex1" class="qss flex-1"></div>
|
|
32
32
|
<div id="padded" class="qss p[4]"></div>
|
|
33
|
+
<div id="contained" class="qss contain-layout"></div>
|
|
34
|
+
<div id="contained-prefixed" class="qss qss-contain-layout"></div>
|
|
33
35
|
<div id="host" class="qss host-static"></div>
|
|
34
36
|
<div class="foreign"><div id="in-foreign" class="qss"></div></div>
|
|
35
37
|
<div id="nearer-container" class="qss w[100] h[10]" style="container-type: inline-size"><div id="deep" class="qss"></div></div>
|
|
@@ -49,6 +51,9 @@ CHECKS = [
|
|
|
49
51
|
[ "flex-1 beats the reset's flex-shrink", "flex1", "flex", "1 1 0%" ],
|
|
50
52
|
[ "p[N] beats the reset (4 units on a 1000px canvas)", "padded", "padding", "4px" ],
|
|
51
53
|
[ "a host app's plain class does not override structure", "host", "position", "absolute" ],
|
|
54
|
+
[ "contain-layout gives layout containment", "contained", "contain", "layout" ],
|
|
55
|
+
[ "qss-contain-layout gives layout containment", "contained-prefixed", "contain", "layout" ],
|
|
56
|
+
[ "a bare actor has no containment", "bare", "contain", "none" ],
|
|
52
57
|
[ "foreign content is left alone", "in-foreign", "position", "static" ]
|
|
53
58
|
].freeze
|
|
54
59
|
|
data/lib/qss/qss_auditor.rb
CHANGED
|
@@ -25,6 +25,7 @@ module QSS
|
|
|
25
25
|
'centered',
|
|
26
26
|
'clickable',
|
|
27
27
|
'contain',
|
|
28
|
+
'contain-layout',
|
|
28
29
|
'contrast',
|
|
29
30
|
'cover',
|
|
30
31
|
'cursor-col-resize',
|
|
@@ -120,7 +121,7 @@ module QSS
|
|
|
120
121
|
|
|
121
122
|
PAYLOAD_TAGS = ["p", "h1", "h2", "h3", "h4", "h5", "h6", "span", "label", "blockquote", "li"].freeze
|
|
122
123
|
|
|
123
|
-
ADJECTIVE_CATEGORIES = {"positional"=>["detached", "floating", "stuck", "absolute", "pos-x", "pos-y", "pos-r", "pos-b", "pos"], "flow_relative"=>["anchored", "relative"], "layout"=>["vertical", "horizontal", "centered", "v-mid", "h-mid", "v-start", "v-end", "h-start", "h-end", "spaced", "around", "evenly", "flex", "flex-col", "flex-row", "flex-wrap", "flex-nowrap", "flex-1", "flex-auto", "flex-none", "items-center", "justify-center", "justify-between", "grid", "table-fixed", "w-full", "h-full", "w-f", "h-f"], "typographic"=>["italic", "uppercase", "lowercase", "underline", "nowrap", "truncate", "font-mono", "font-sans", "font-medium", "font-bold", "font-black", "text-size", "leading", "tracking", "tracking-tighter", "tracking-wide", "tracking-wider", "tracking-widest", "icon-size"], "visual"=>["bg", "border", "border-t", "border-b", "border-l", "border-r", "rounded", "rounded-full", "shadow", "opacity", "blur", "bright", "contrast", "grayscale", "hue", "invert", "saturate", "sepia", "blend", "contain", "cover", "visible", "invisible", "bg-alpha", "border-alpha", "text-alpha"], "interactive"=>["clickable", "smooth", "busy", "ghost", "unselectable", "scroll-smooth", "scroll", "cursor-col-resize", "cursor-row-resize", "transition-all", "transition-colors", "transition-none", "ring", "resize", "outline-none"], "internal"=>["qss", "dev-border", "group", "foreign", "qss-legibility-override", "qss-ergonomic-override", "qss-payload-override", "qss-dampen-scaling", "qss-content-driven"]}.freeze
|
|
124
|
+
ADJECTIVE_CATEGORIES = {"positional"=>["detached", "floating", "stuck", "absolute", "pos-x", "pos-y", "pos-r", "pos-b", "pos"], "flow_relative"=>["anchored", "relative"], "layout"=>["vertical", "horizontal", "centered", "v-mid", "h-mid", "v-start", "v-end", "h-start", "h-end", "spaced", "around", "evenly", "flex", "flex-col", "flex-row", "flex-wrap", "flex-nowrap", "flex-1", "flex-auto", "flex-none", "items-center", "justify-center", "justify-between", "grid", "table-fixed", "contain-layout", "w-full", "h-full", "w-f", "h-f"], "typographic"=>["italic", "uppercase", "lowercase", "underline", "nowrap", "truncate", "font-mono", "font-sans", "font-medium", "font-bold", "font-black", "text-size", "leading", "tracking", "tracking-tighter", "tracking-wide", "tracking-wider", "tracking-widest", "icon-size"], "visual"=>["bg", "border", "border-t", "border-b", "border-l", "border-r", "rounded", "rounded-full", "shadow", "opacity", "blur", "bright", "contrast", "grayscale", "hue", "invert", "saturate", "sepia", "blend", "contain", "cover", "visible", "invisible", "bg-alpha", "border-alpha", "text-alpha"], "interactive"=>["clickable", "smooth", "busy", "ghost", "unselectable", "scroll-smooth", "scroll", "cursor-col-resize", "cursor-row-resize", "transition-all", "transition-colors", "transition-none", "ring", "resize", "outline-none"], "internal"=>["qss", "dev-border", "group", "foreign", "qss-legibility-override", "qss-ergonomic-override", "qss-payload-override", "qss-dampen-scaling", "qss-content-driven"]}.freeze
|
|
124
125
|
|
|
125
126
|
ILLEGAL_COMBOS = [{"tag_in"=>"payload_tags", "forbid_category"=>"positional", "severity"=>"red", "message"=>"Protocol Violation: Payload tags (<tag>) cannot carry flow-breaking positional adjectives. Use a wrapping <div> Frame.", "escape_hatch"=>"qss-payload-override"}].freeze
|
|
126
127
|
|
data/lib/qss/version.rb
CHANGED