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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8e93da5bd3a65eb8804f5416a1a0315f23110bb6027703c71974b7fa4443d73
4
- data.tar.gz: d00e38e05740739f64aff39d17f491558f76a0556ec71abaa7781c278059c60c
3
+ metadata.gz: 66150ff6d5d7310f9fcdff3e694f321c3dce50ae18503caccd2a0792e4cce86a
4
+ data.tar.gz: 74f4ce6e564e503a967c85f5629e4d474813d45b2c0cc54dbe7ae7ed011aba2e
5
5
  SHA512:
6
- metadata.gz: dc74ce934ef4007d538d184b46822b89bbb3e6ee1c0a2ff90900ae69729434e5413dac0380c33976ae2ba43cf01a9a30e6b67140f4055fdadf758781b31f7be1
7
- data.tar.gz: aa18e0742c0dfc5bb26067fed5dff96f52b28f0e495634b9aac87e1ead4ed60ae5124cae80b12f5b4fce43f44f2a06f7d8f71f2f7c8e99f0c68b3147f4799931
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
- ## [0.1.0] - unreleased
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
 
@@ -60,6 +60,7 @@ const QSSEngine = (function() {
60
60
  'centered',
61
61
  'clickable',
62
62
  'contain',
63
+ 'contain-layout',
63
64
  'contrast',
64
65
  'cover',
65
66
  'cursor-col-resize',
@@ -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
@@ -48,6 +48,7 @@ adjectives:
48
48
  - justify-between
49
49
  - grid
50
50
  - table-fixed
51
+ - contain-layout
51
52
  - w-full
52
53
  - h-full
53
54
  - w-f
@@ -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
 
@@ -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
@@ -3,7 +3,7 @@
3
3
  module QSS
4
4
  # The gem's version. QSS::VERSION is the usual spelling; QSS::Version::STRING the same value.
5
5
  module Version
6
- STRING = "0.1.0"
6
+ STRING = "0.1.1"
7
7
  end
8
8
 
9
9
  VERSION = Version::STRING
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kraig Fairhurst