qss 0.1.1 → 0.1.3

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: 66150ff6d5d7310f9fcdff3e694f321c3dce50ae18503caccd2a0792e4cce86a
4
- data.tar.gz: 74f4ce6e564e503a967c85f5629e4d474813d45b2c0cc54dbe7ae7ed011aba2e
3
+ metadata.gz: 52a11c20467a26938ab77c01f1f66a1c1c10630f188cdbfa7e55a93b736a777d
4
+ data.tar.gz: 88d592778cc50318d8b04b45b7cd879b8e380ee12d8f5df57d4ee994000a9221
5
5
  SHA512:
6
- metadata.gz: 1cdb64154903050a037a49e30587269f3113350d35288c313c12861b1bcba106811e2d263d96a7cab490ef57268f96bf4d7c96a0868670eaa4a68a17365c3622
7
- data.tar.gz: 0c19536b299d641009e3560372b8784bf7de5e6d7a10006a26640e818601253dbcd187b82919689354033ac93b1e72c88b80488686a15953fe5debfc7bb78d31
6
+ metadata.gz: 82d8429ff4872b01ea4a11bbaa4547f941be8016b07969b5faf060d064cfa48792271672f3a8d8e5ea2235c55c7b0c05b262bed12b319f3b6778b5508fb7f3e7
7
+ data.tar.gz: 1b57085d9868676508bb6780ff0939dcd9ff6d9d6139d0902d3bdfd63b1653de0bc0126563c5abdc4165e936a25a1af5c21d67052f397b2e6728c58710c67c32
data/CHANGELOG.md CHANGED
@@ -5,6 +5,67 @@ versions follow [Semantic Versioning](https://semver.org/) (before 1.0, minor ve
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.1.3] - 2026-10-17
9
+
10
+ ### Added
11
+ - `QSS::QssNativeAuditor::Dimensions.missing_axes` now recognizes two more ways an axis counts as declared,
12
+ revisiting a 2026-09-24 deferral now that flex and Tailwind's boundary are settled (DESIGN_HISTORY #12):
13
+ two opposite insets on the same axis (`pos-x[N]`+`pos-r[N]` for width, `pos-y[N]`+`pos-b[N]` for height -- both
14
+ edges pinned fixes the size exactly with no width/height class at all), and `flex-1`/`flex-auto` on the flex
15
+ parent's own main axis (resolved from the parent's `.vertical`/`.flex`/`.horizontal` classes; with no flex
16
+ parent, or on the cross axis, it still declares nothing -- never guessed). Takes an optional `parent_classes:`
17
+ keyword, passed by `audit_file` from the actual DOM parent.
18
+ - `QSS::QssNativeAuditor` now checks that every class literally resolves to a rule in the compiled stylesheet, not
19
+ just that its shape matches a known pattern. The 2026-09-21 census found about 29 percent of real class tokens
20
+ resolved to no CSS at all while both auditors reported green; this is the guardrail that finding called for,
21
+ closing the gap. Checks core's own `qss_core.css` by default, or a consumer's own compiled output via the new
22
+ `auditor.stylesheet_path` config key (following the same pattern as `registry_path`) -- a consumer should point
23
+ this at what its markup actually renders against. A handful of classes are deliberately CSS-free behavioral
24
+ flags (`qss`, `foreign`, `qss-legibility-override`, `qss-ergonomic-override`, `qss-payload-override`,
25
+ `qss-dampen-scaling`, `qss-content-driven`) and are exempt. New finding: `unresolved_class` (red), deduplicated
26
+ per distinct class per file. Covered by a new spec file (21 examples) plus a configuration spec for the new key.
27
+
28
+ ### Changed
29
+ - `contain-layout`/`qss-contain-layout` now clip paint by default (`contain: layout paint`, was `contain: layout`
30
+ alone), so a frame's overflow can no longer bleed into its neighbours -- `contain: layout` isolates layout math
31
+ but not paint. Anything that needs to visually escape a frame on purpose (tooltips, dropdowns, modals) already
32
+ has to go through the portal (a `z-index` outside it is its own red violation), so this doesn't reopen that
33
+ case. New opt-out for the rare frame that wants decorative overflow (a shadow, a hover scale) without the
34
+ portal: add `qss-paint-override` alongside `contain-layout`/`qss-contain-layout` to restore layout-only
35
+ containment. Covered by two new specs on the compiled stylesheet and, in the browser render check, a real
36
+ `elementFromPoint` hit-test proving an overflowing child is actually clipped (and, with the override, actually
37
+ isn't) -- not just that `getComputedStyle` reports the right `contain` value.
38
+
39
+ ### Fixed
40
+ - `QSS::QssNativeAuditor`'s advice for an unregistered native qualifier (`{qualifier}-{nativeTag}`) no longer
41
+ suggests dropping the qualifier. Doing so turns the id into a bare native tag, which the auditor itself flags as
42
+ a separate red `missing_qualifier` violation -- the old advice traded one red finding for another instead of
43
+ resolving anything. The only advice now given is to register what the qualifier adds to the base object.
44
+ - `--qnt` (the structural unit) is now dampened at the extremes: `clamp(0.39px, 0.1cqw, 3.2px)` instead of plain
45
+ `0.1cqw`/`0.1vw`. Floor is the qnt value at a 390px CSS viewport width (a real narrow-mobile width regardless of
46
+ the panel's physical/FHD+/QHD+ resolution, since `cqw`/`vw` only ever see CSS pixels); cap is the qnt value at
47
+ 3200px, just past a maximized 1440p/27" monitor, so ordinary desktop widths (up to ~2560px) scale exactly as
48
+ before and only genuine ultra-wide/high-resolution canvases or genuine phone-narrow ones are dampened. Past the
49
+ cap, every structural dimension stays fixed regardless of how much wider the canvas gets -- extra width becomes
50
+ more usable space, not bigger borders/gaps/padding. Bounds are configurable (`config.dampen_scale` in
51
+ `grammar.yml`/a consumer's config). Covered by 4 new render-check assertions (25 in total), 2 proving the clamp
52
+ engages at real extreme widths, not just that the unclamped math is right.
53
+ - Responsive percentage utilities (`qss-{breakpoint}:w-pct[N]`, `h-pct`, `pos-x-pct`, `pos-y-pct`, for every
54
+ horizontal and vertical breakpoint) now compile to valid CSS. The generator previously interpolated the raw
55
+ number (`#{$i * 0.1}%`), which Dart Sass renders with a space before the unit (`width: 0.1 %;`), an invalid
56
+ declaration browsers drop; it now uses `percentage()`, same as the non-responsive `w-pct[N]` rule already did.
57
+ These rules were also never scoped to `#qss-canvas` like every other utility in the file (missing the
58
+ `qss-dsl-boost` wrapper), so once valid they would have applied anywhere a host app reused the class name; they
59
+ are now scoped along with everyone else. Covered by two new specs on the compiled stylesheet, confirmed to fail
60
+ against the old output and pass against the fix.
61
+
62
+ ## [0.1.2] - 2026-10-05
63
+
64
+ ### Changed
65
+ - Gem metadata only, no code changes: the summary and description now explain why QSS exists (agents and flex/grid
66
+ layout, addressable structure, static auditing and its limits, the origin in Parapet), and the gem links to
67
+ `docs/DESIGN_HISTORY.md` as its documentation. The rubygems.org page reads these from the latest release.
68
+
8
69
  ## [0.1.1] - 2026-10-05
9
70
 
10
71
  ### Fixed
data/README.md CHANGED
@@ -6,7 +6,7 @@ thousandth of the canvas width, computed by CSS alone. QSS ships compiled CSS, i
6
6
  JavaScript engine, and two **auditors** that check views against QSS's rules. It includes a Rails engine for the
7
7
  asset pipeline; the auditors and configuration also work in plain Ruby.
8
8
 
9
- > **Status: 0.1.0, early.** QSS was extracted from the Parapet project (a Rails development tool),
9
+ > **Status: 0.1.x, early.** QSS was extracted from the Parapet project (a Rails development tool),
10
10
  > which is its first consumer. Expect names and APIs to change before 1.0. See [CHANGELOG.md](CHANGELOG.md).
11
11
  > Why QSS is designed this way: [docs/DESIGN_HISTORY.md](docs/DESIGN_HISTORY.md).
12
12
 
@@ -116,6 +116,7 @@ const QSSEngine = (function() {
116
116
  'qss-dampen-scaling',
117
117
  'qss-ergonomic-override',
118
118
  'qss-legibility-override',
119
+ 'qss-paint-override',
119
120
  'qss-payload-override',
120
121
  'relative',
121
122
  'resize',
@@ -51,6 +51,12 @@ $qss-content-scale: (
51
51
  "calibration-width": 1440
52
52
  ) !default;
53
53
 
54
+ /* Structural unit dampening (SETTLED 2026-10-17). */
55
+ $qss-dampen-scale: (
56
+ "floor-width": 390,
57
+ "cap-width": 3200
58
+ ) !default;
59
+
54
60
  /* Named-group registry (consumer-supplied). */
55
61
  $qss-group-names: () !default;
56
62