its-swiss 0.9.1 → 1.1.0
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 +100 -1
- data/README.md +108 -546
- data/app/assets/javascripts/its_swiss.js +12 -0
- data/app/assets/stylesheets/its_swiss/components.css +168 -308
- data/app/assets/stylesheets/its_swiss/grid.css +35 -35
- data/app/assets/stylesheets/its_swiss/specimen.css +5 -1
- data/app/assets/stylesheets/its_swiss/tokens.css +48 -111
- data/app/assets/stylesheets/its_swiss/type.css +27 -101
- data/app/helpers/its_swiss/application_helper.rb +15 -9
- data/app/views/its_swiss/specimen/_buttons.html.erb +3 -3
- data/app/views/its_swiss/specimen/_figure.html.erb +12 -0
- data/app/views/its_swiss/specimen/_form.html.erb +13 -1
- data/app/views/its_swiss/specimen/_grid.html.erb +13 -0
- data/app/views/its_swiss/specimen/_page_head.html.erb +3 -2
- data/app/views/layouts/its_swiss/shell.html.erb +3 -0
- data/config/importmap.rb +3 -5
- data/lib/its_swiss/form_builder.rb +11 -0
- data/lib/its_swiss/version.rb +1 -1
- data/lib/its_swiss.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 23a617f3f75e3b652becb681c8b54a38d122ba3aa0d3b7cfa4cc3187eb2177b5
|
|
4
|
+
data.tar.gz: d7d384f67cf5653cb917322ccb560c05fa6a97858f8668c46785c7520e86a562
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 56fb78910a3dd24b99bce266e8d008096ae4158efcb80e8025843a5813d958cdf1673272b834f7b15926fac0b2111b0de168880ee4f6dc1e639beb9a3ea3b52c
|
|
7
|
+
data.tar.gz: 05f4c40910d9febd7f82e66867be7c5c1ef30c617a5d0cead8376c3ac931bb1651e689c1eecc6d8ff88524841f5e0e8b19a92f0a9d4a70c1d53f4522f74d4204
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,105 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
Semver. Consumers pin `~> 0
|
|
3
|
+
Semver. Consumers pin `~> 1.0`.
|
|
4
|
+
|
|
5
|
+
## 1.1.0 — 2026-09-24
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **A textarea is ruled.** A dotted rule on every line of the grid that type
|
|
10
|
+
can stand on, on the row of pixels a rule would take there, in
|
|
11
|
+
`--rule-strong`. None on the line of air under the label, which nothing is
|
|
12
|
+
written on, and none under the last line, which the control's own rule
|
|
13
|
+
closes. The dots are painted in the text's box and scroll with it, so a
|
|
14
|
+
long message keeps a rule under every line. `--ruled-dot` sets their
|
|
15
|
+
colour.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **A textarea's line of air is a border.** It was padding, so text scrolled
|
|
20
|
+
up ran on into the air, under a dense form's label. It is a transparent
|
|
21
|
+
border of the same width, so scrolled text is cut at the first line. The
|
|
22
|
+
box, and where its text sits, are unchanged.
|
|
23
|
+
|
|
24
|
+
## 1.0.0 — 2026-09-08
|
|
25
|
+
|
|
26
|
+
The surface three applications settled on, reviewed as a whole: what a tech
|
|
27
|
+
lead found and what Müller-Brockmann would have said. The library's
|
|
28
|
+
arguments now live in `DESIGN.md`, once.
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- **`--span` no longer inherits.** A custom property inherits by default, so
|
|
33
|
+
a grid inside a spanned item started every child of its own at the parent's
|
|
34
|
+
span. `--span` is a registered property with `inherits: false` and no
|
|
35
|
+
initial value, so a child that says nothing still runs the whole field.
|
|
36
|
+
- **The metric-override script carries the page's nonce.** The shell renders
|
|
37
|
+
`csp_meta_tag`, and a content security policy blocked the one inline script
|
|
38
|
+
the library writes, which left Safari in step and not registered with
|
|
39
|
+
nobody seeing why.
|
|
40
|
+
- **A field is the page's field.** `--field` was derived from `--page-max`,
|
|
41
|
+
so below 82rem `.fields` was wider than the viewport and the measure was
|
|
42
|
+
600px on a phone. It is measured in container units from the `.page` the
|
|
43
|
+
fields are laid out in; `.fields` never exceeds its box.
|
|
44
|
+
- **A control's focus is its rule.** The focus ring was a box drawn 3px
|
|
45
|
+
outside a two-line control whose only visible part is a rule, and it
|
|
46
|
+
crossed the label above it. The focus is the rule going heavy, in the
|
|
47
|
+
accent, with the box still two lines.
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
|
|
51
|
+
- **The measure is a count of characters.** `--measure-characters` (65) in
|
|
52
|
+
the type's own font, taken up to the nearest whole run of fields with
|
|
53
|
+
`round()`, and never past the page. Three fields whatever the count was a
|
|
54
|
+
proportion: a quarter of a twelve-column page, and wider than a phone.
|
|
55
|
+
- **The module.** `--module` (6) is a field's height in lines: the columns
|
|
56
|
+
divide the page across and the module divides it down. `.modules` is a
|
|
57
|
+
block of whole modules and `.figure--modular` a picture in one, which is
|
|
58
|
+
the grid's proportion rather than the window's.
|
|
59
|
+
- **The dense form.** `.form--dense` puts each label on its control's line of
|
|
60
|
+
air, directly above the text on its rule: three lines a field rather than
|
|
61
|
+
four, for a form of many fields or a panel.
|
|
62
|
+
- **A textarea is measured in lines.** `rows:` on the builder's `text_area`
|
|
63
|
+
writes `--rows`, which the stylesheet reads; four when it is not given.
|
|
64
|
+
- **The library registers its own controllers.** `its_swiss.js` registers
|
|
65
|
+
the clipboard and the live search with the host's Stimulus application,
|
|
66
|
+
and the shell imports it. A host has nothing to write; the two lines it
|
|
67
|
+
wrote before are harmless.
|
|
68
|
+
- **`DESIGN.md`.** The arguments, moved out of the stylesheets and stated
|
|
69
|
+
once; the stylesheets say what a rule is for in a sentence.
|
|
70
|
+
|
|
71
|
+
### Changed
|
|
72
|
+
|
|
73
|
+
- **A form has no width of its own.** `.form` was at the measure and started
|
|
74
|
+
its children on the left; a form laid out on the fields had to undo both.
|
|
75
|
+
`its_swiss_form_with` writes `class="form measure"`, so a form written
|
|
76
|
+
through the helper is where it was. A form written with `form_with` and
|
|
77
|
+
`class: "form"` is full width now: add `measure`.
|
|
78
|
+
- **One filled button.** `.button--accent` is gone: the primary action is in
|
|
79
|
+
ink, and a second filled box was a standing temptation against the one red
|
|
80
|
+
a page has.
|
|
81
|
+
- **The explanation's mark is a word.** `explain` writes "About" in the
|
|
82
|
+
small register rather than a question mark; `label:` says another word.
|
|
83
|
+
- **The control's rule at rest is the strong rule**, `--rule-strong`, which
|
|
84
|
+
the library had declared and never used; ink under the hand, the accent
|
|
85
|
+
when refused or focused.
|
|
86
|
+
- **Tokens nothing used are gone**: `--space-5`, `--space-13`, `--line-6`.
|
|
87
|
+
`--space-6`, `--space-8` and `--line-4` remain. Pandatone read two of them
|
|
88
|
+
and will move to the ladder when it takes 1.0.
|
|
89
|
+
- **The tests that pinned formatting pin behaviour.** Three assertions that
|
|
90
|
+
matched exact runs of CSS text are computed-style assertions in the
|
|
91
|
+
browser suite; the guards that are about the source stay.
|
|
92
|
+
|
|
93
|
+
### Migration
|
|
94
|
+
|
|
95
|
+
- `gem "its-swiss", "~> 1.0"`.
|
|
96
|
+
- A `form_with(..., class: "form")` that wants the measure adds `measure`.
|
|
97
|
+
- `.button--accent` becomes `.button--primary`.
|
|
98
|
+
- `--space-5` becomes `--space-6` or a line; `--space-13` becomes
|
|
99
|
+
`calc(var(--space-unit) * 13)` if it is truly wanted; `--line-6` becomes
|
|
100
|
+
`calc(var(--line) * 6)`.
|
|
101
|
+
- The two Stimulus registrations in the host's `controllers/index.js` can go.
|
|
102
|
+
- A test that read the explanation's `?` reads "About".
|
|
4
103
|
|
|
5
104
|
## 0.9.1 — 2026-09-07
|
|
6
105
|
|