rastrillo / fiesta Public

Show a disabled seg-tabs button as one: faint, default cursor, no hover

A disabled seg-tabs button kept the pointer cursor, the enabled tab's
text colour and its hover, so it read as a choice that would work and
a click did nothing. It now takes the faint text a disabled page chip
or calendar day has and the default cursor a disabled rst-btn has,
which is the convention Fiesta already keeps (it uses no not-allowed
cursor anywhere). The rule comes after the hover and the thumb, which
weigh the same, so a hovered or pressed disabled button stays faint.

The rule is written with the child combinator, like the other button
rules, and its two selectors are exact newOnOldMarkup entries. The
promise gates' grammar admits :disabled beside :hover and :active: a
state only narrows a compound and never stands for a name, and two
grammar rows hold that (a disabled button under a new name passes, one
under only 1.0 names is refused for lacking a positive requirement).

TestASegTabButtonLooksLikeASegTabLink gains a disabled button in its
track and checks, in every theme, scheme and pointer, that its text is
the faint colour (with a control that faint differs from a tab's rest
colour), its cursor is default, and a forced hover and press leave it
faint. Red by assertion before the rule in all 12 legs; with the rule
moved before the hover, only the hover assertion fails.

Size, gzip level 6 (+14 here; the buttons' change is +107 of 140):
  fiesta.css        23,239 -> 23,253 (+14)
  fiesta-plain.css  22,524 -> 22,538 (+14)
  fiesta-signal.css 22,636 -> 22,650 (+14)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 5cc67e55fc5389343d77aaa345ab39e64142e2fb parent c1bb9ae
4 files changed, +45 −4
  • check/baseline_test.go +2 −0
  • check/segtabs_browser_test.go +31 −1
  • check/selectors_test.go +6 −3
  • css/tokens.css +6 −0

CI passed — run details

CI log
=== gofmt ===
=== no-rastrillo ===
go test -run '^(TestFiestaNeverImportsRastrillo|TestThePublicPackagesLinkNoBrowser)$' -count=1 .
ok  	amadan.net/rastrillo/fiesta	0.221s
=== size ===
go test ./internal/build -run '^TestTheOneLinkIsUnder25KiBGzipped$' -count=1 -v
=== RUN   TestTheOneLinkIsUnder25KiBGzipped
    build_test.go:138: fiesta-plain.css: 154537 bytes, 22538 bytes gzipped (22.0 KiB of the 25.0 KiB limit)
    build_test.go:138: fiesta-signal.css: 154632 bytes, 22650 bytes gzipped (22.1 KiB of the 25.0 KiB limit)
    build_test.go:138: fiesta.css: 157451 bytes, 23253 bytes gzipped (22.7 KiB of the 25.0 KiB limit)
--- PASS: TestTheOneLinkIsUnder25KiBGzipped (0.02s)
PASS
ok  	amadan.net/rastrillo/fiesta/internal/build	0.024s
=== history ===
history: 25 commits; release tags: v1.0.0
=== suite ===
--- shard 0 of 48 ---
==> shard 0 of 48: make root
go build ./...
go vet ./...
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh root 'internal/gallery@3 cmd/fiesta@2 internal/www@2'
ok  	amadan.net/rastrillo/fiesta	2.851s
ok  	amadan.net/rastrillo/fiesta/check	7.205s
ok  	amadan.net/rastrillo/fiesta/example	0.149s
?   	amadan.net/rastrillo/fiesta/hack/seed/english	[no test files]
ok  	amadan.net/rastrillo/fiesta/internal/axe	0.080s
ok  	amadan.net/rastrillo/fiesta/internal/build	1.068s
ok  	amadan.net/rastrillo/fiesta/internal/codeview	0.023s
?   	amadan.net/rastrillo/fiesta/internal/harness	[no test files]
ok  	amadan.net/rastrillo/fiesta/internal/markup	0.023s
ok  	amadan.net/rastrillo/fiesta/internal/nodetest	0.389s
ok  	amadan.net/rastrillo/fiesta/internal/site	2.453s
ok  	amadan.net/rastrillo/fiesta/internal/tokens	0.031s
suite: root took 15s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m11.650000s 0m1.900000s
--- shard 1 of 48 ---
==> shard 1 of 48: make test.internal.gallery~1of3
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.gallery~1of3'
gotest: slice 1 of 3 of ./internal/gallery/ runs 36 of 108 test tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	63.779s
suite: test.internal.gallery~1of3 took 69s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m49.380000s 0m1.200000s
--- shard 2 of 48 ---
==> shard 2 of 48: make test.internal.gallery~2of3
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.gallery~2of3'
gotest: slice 2 of 3 of ./internal/gallery/ runs 36 of 108 test tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	66.832s
suite: test.internal.gallery~2of3 took 72s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m51.940000s 0m1.350000s
--- shard 3 of 48 ---
==> shard 3 of 48: make test.internal.gallery~3of3
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.gallery~3of3'
gotest: slice 3 of 3 of ./internal/gallery/ runs 36 of 108 test tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	61.998s
suite: test.internal.gallery~3of3 took 67s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m47.360000s 0m1.250000s
--- shard 4 of 48 ---
==> shard 4 of 48: make test.cmd.fiesta~1of2
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'cmd.fiesta~1of2'
gotest: slice 1 of 2 of ./cmd/fiesta/ runs 7 of 12 test tests
ok  	amadan.net/rastrillo/fiesta/cmd/fiesta	47.951s
suite: test.cmd.fiesta~1of2 took 51s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m32.750000s 0m2.050000s
--- shard 5 of 48 ---
==> shard 5 of 48: make test.cmd.fiesta~2of2
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'cmd.fiesta~2of2'
gotest: slice 2 of 2 of ./cmd/fiesta/ runs 5 of 12 test tests
ok  	amadan.net/rastrillo/fiesta/cmd/fiesta	52.611s
suite: test.cmd.fiesta~2of2 took 56s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m34.910000s 0m2.260000s
--- shard 6 of 48 ---
==> shard 6 of 48: make test.internal.www~1of2
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.www~1of2'
gotest: slice 1 of 2 of ./internal/www/ runs 11 of 25 test tests
ok  	amadan.net/rastrillo/fiesta/internal/www	62.341s
suite: test.internal.www~1of2 took 67s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m46.120000s 0m1.560000s
--- shard 7 of 48 ---
==> shard 7 of 48: make test.internal.www~2of2
FIESTA_TEST_REQUIRE_NODE=1 FIESTA_TEST_REQUIRE_GIT=1 FIESTA_TEST_REQUIRE_TAGS=1 ./hack/gotest.sh test 'internal.www~2of2'
gotest: slice 2 of 2 of ./internal/www/ runs 14 of 25 test tests
ok  	amadan.net/rastrillo/fiesta/internal/www	58.626s
suite: test.internal.www~2of2 took 64s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m43.860000s 0m1.540000s
--- shard 8 of 48 ---
==> shard 8 of 48: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.8.2 -tags browser ./...
suite: staticcheck took 12s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m13.890000s 0m0.910000s
--- shard 9 of 48 ---
==> shard 9 of 48: make govulncheck
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
=== Symbol Results ===

No vulnerabilities found.

Your code is affected by 0 vulnerabilities.
This scan also found 2 vulnerabilities in packages you import and 5
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
suite: govulncheck took 8s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m2.970000s 0m0.380000s
--- shard 10 of 48 ---
==> shard 10 of 48: make gitleaks
go run github.com/zricethezav/gitleaks/v8@v8.30.1 git --no-banner --redact --log-opts='--full-history --diff-filter=tuxdb HEAD' .
5:00AM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
5:00AM INF 25 commits scanned.
5:00AM INF scanned ~8316025 bytes (8.32 MB) in 6.28s
5:00AM INF no leaks found
suite: gitleaks took 8s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m7.040000s 0m0.230000s
--- shard 11 of 48 ---
==> shard 11 of 48: make browser.internal.harness
./hack/gotest.sh browser 'internal.harness'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: ./internal/harness/ runs its 10 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/harness	5.611s
suite: browser.internal.harness took 11s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m1.690000s 0m1.250000s
--- shard 12 of 48 ---
==> shard 12 of 48: make browser.check~1of13
./hack/gotest.sh browser 'check~1of13'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 1 of 13 of ./check/ runs 16 of 217 browser tests
ok  	amadan.net/rastrillo/fiesta/check	87.694s
suite: browser.check~1of13 took 98s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m47.380000s 0m13.790000s
--- shard 13 of 48 ---
==> shard 13 of 48: make browser.check~2of13
./hack/gotest.sh browser 'check~2of13'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 2 of 13 of ./check/ runs 16 of 217 browser tests
ok  	amadan.net/rastrillo/fiesta/check	89.522s
suite: browser.check~2of13 took 100s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m49.550000s 0m13.060000s
--- shard 14 of 48 ---
==> shard 14 of 48: make browser.check~3of13
./hack/gotest.sh browser 'check~3of13'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 3 of 13 of ./check/ runs 16 of 217 browser tests
ok  	amadan.net/rastrillo/fiesta/check	87.067s
suite: browser.check~3of13 took 97s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m39.150000s 0m10.820000s
--- shard 15 of 48 ---
==> shard 15 of 48: make browser.check~4of13
./hack/gotest.sh browser 'check~4of13'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 4 of 13 of ./check/ runs 16 of 217 browser tests
ok  	amadan.net/rastrillo/fiesta/check	85.118s
suite: browser.check~4of13 took 95s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m51.890000s 0m14.990000s
--- shard 16 of 48 ---
==> shard 16 of 48: make browser.check~5of13
./hack/gotest.sh browser 'check~5of13'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 5 of 13 of ./check/ runs 17 of 217 browser tests
ok  	amadan.net/rastrillo/fiesta/check	77.829s
suite: browser.check~5of13 took 88s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m37.820000s 0m13.130000s
--- shard 17 of 48 ---
==> shard 17 of 48: make browser.check~6of13
./hack/gotest.sh browser 'check~6of13'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 6 of 13 of ./check/ runs 17 of 217 browser tests
ok  	amadan.net/rastrillo/fiesta/check	75.559s
suite: browser.check~6of13 took 86s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m41.640000s 0m14.190000s
--- shard 18 of 48 ---
==> shard 18 of 48: make browser.check~7of13
./hack/gotest.sh browser 'check~7of13'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 7 of 13 of ./check/ runs 17 of 217 browser tests
ok  	amadan.net/rastrillo/fiesta/check	82.112s
suite: browser.check~7of13 took 92s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m43.160000s 0m13.700000s
--- shard 19 of 48 ---
==> shard 19 of 48: make browser.check~8of13
./hack/gotest.sh browser 'check~8of13'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 8 of 13 of ./check/ runs 17 of 217 browser tests
ok  	amadan.net/rastrillo/fiesta/check	88.008s
suite: browser.check~8of13 took 98s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m44.800000s 0m15.150000s
--- shard 20 of 48 ---
==> shard 20 of 48: make browser.check~9of13
./hack/gotest.sh browser 'check~9of13'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 9 of 13 of ./check/ runs 17 of 217 browser tests
ok  	amadan.net/rastrillo/fiesta/check	73.327s
suite: browser.check~9of13 took 84s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m29.010000s 0m8.940000s
--- shard 21 of 48 ---
==> shard 21 of 48: make browser.check~10of13
./hack/gotest.sh browser 'check~10of13'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 10 of 13 of ./check/ runs 17 of 217 browser tests
ok  	amadan.net/rastrillo/fiesta/check	79.701s
suite: browser.check~10of13 took 90s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m37.220000s 0m12.260000s
--- shard 22 of 48 ---
==> shard 22 of 48: make browser.check~11of13
./hack/gotest.sh browser 'check~11of13'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 11 of 13 of ./check/ runs 17 of 217 browser tests
ok  	amadan.net/rastrillo/fiesta/check	83.812s
suite: browser.check~11of13 took 94s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m41.500000s 0m13.990000s
--- shard 23 of 48 ---
==> shard 23 of 48: make browser.check~12of13
./hack/gotest.sh browser 'check~12of13'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 12 of 13 of ./check/ runs 17 of 217 browser tests
ok  	amadan.net/rastrillo/fiesta/check	81.510s
suite: browser.check~12of13 took 92s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m43.190000s 0m14.770000s
--- shard 24 of 48 ---
==> shard 24 of 48: make browser.check~13of13
./hack/gotest.sh browser 'check~13of13'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: slice 13 of 13 of ./check/ runs 17 of 217 browser tests
ok  	amadan.net/rastrillo/fiesta/check	78.407s
suite: browser.check~13of13 took 89s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m37.370000s 0m11.200000s
--- shard 25 of 48 ---
==> shard 25 of 48: make browser.internal.gallery~1of18
./hack/gotest.sh browser 'internal.gallery~1of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 1 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	38.605s
suite: browser.internal.gallery~1of18 took 47s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m15.780000s 0m3.750000s
--- shard 26 of 48 ---
==> shard 26 of 48: make browser.internal.gallery~2of18
./hack/gotest.sh browser 'internal.gallery~2of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 2 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	49.358s
suite: browser.internal.gallery~2of18 took 58s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m13.800000s 0m2.750000s
--- shard 27 of 48 ---
==> shard 27 of 48: make browser.internal.gallery~3of18
./hack/gotest.sh browser 'internal.gallery~3of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 3 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	58.623s
suite: browser.internal.gallery~3of18 took 68s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m16.260000s 0m4.210000s
--- shard 28 of 48 ---
==> shard 28 of 48: make browser.internal.gallery~4of18
./hack/gotest.sh browser 'internal.gallery~4of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 4 of 18 of ./internal/gallery/ runs 6 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	49.502s
suite: browser.internal.gallery~4of18 took 59s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m13.610000s 0m2.800000s
--- shard 29 of 48 ---
==> shard 29 of 48: make browser.internal.gallery~5of18
./hack/gotest.sh browser 'internal.gallery~5of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 5 of 18 of ./internal/gallery/ runs 6 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	58.792s
suite: browser.internal.gallery~5of18 took 68s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m18.000000s 0m5.090000s
--- shard 30 of 48 ---
==> shard 30 of 48: make browser.internal.gallery~6of18
./hack/gotest.sh browser 'internal.gallery~6of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 6 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	56.479s
suite: browser.internal.gallery~6of18 took 66s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m15.900000s 0m3.990000s
--- shard 31 of 48 ---
==> shard 31 of 48: make browser.internal.gallery~7of18
./hack/gotest.sh browser 'internal.gallery~7of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 7 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	56.258s
suite: browser.internal.gallery~7of18 took 65s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m13.920000s 0m2.730000s
--- shard 32 of 48 ---
==> shard 32 of 48: make browser.internal.gallery~8of18
./hack/gotest.sh browser 'internal.gallery~8of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 8 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	58.309s
suite: browser.internal.gallery~8of18 took 67s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m17.810000s 0m4.560000s
--- shard 33 of 48 ---
==> shard 33 of 48: make browser.internal.gallery~9of18
./hack/gotest.sh browser 'internal.gallery~9of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 9 of 18 of ./internal/gallery/ runs 6 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	65.480s
suite: browser.internal.gallery~9of18 took 75s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m22.560000s 0m7.270000s
--- shard 34 of 48 ---
==> shard 34 of 48: make browser.internal.gallery~10of18
./hack/gotest.sh browser 'internal.gallery~10of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 10 of 18 of ./internal/gallery/ runs 2 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	60.521s
suite: browser.internal.gallery~10of18 took 69s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m13.960000s 0m2.670000s
--- shard 35 of 48 ---
==> shard 35 of 48: make browser.internal.gallery~11of18
./hack/gotest.sh browser 'internal.gallery~11of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 11 of 18 of ./internal/gallery/ runs 2 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	61.187s
suite: browser.internal.gallery~11of18 took 71s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m13.660000s 0m2.700000s
--- shard 36 of 48 ---
==> shard 36 of 48: make browser.internal.gallery~12of18
./hack/gotest.sh browser 'internal.gallery~12of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 12 of 18 of ./internal/gallery/ runs 2 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	63.292s
suite: browser.internal.gallery~12of18 took 73s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m18.020000s 0m4.670000s
--- shard 37 of 48 ---
==> shard 37 of 48: make browser.internal.gallery~13of18
./hack/gotest.sh browser 'internal.gallery~13of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 13 of 18 of ./internal/gallery/ runs 4 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	64.944s
suite: browser.internal.gallery~13of18 took 74s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m18.920000s 0m5.280000s
--- shard 38 of 48 ---
==> shard 38 of 48: make browser.internal.gallery~14of18
./hack/gotest.sh browser 'internal.gallery~14of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 14 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	66.122s
suite: browser.internal.gallery~14of18 took 75s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m19.340000s 0m5.250000s
--- shard 39 of 48 ---
==> shard 39 of 48: make browser.internal.gallery~15of18
./hack/gotest.sh browser 'internal.gallery~15of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 15 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	66.156s
suite: browser.internal.gallery~15of18 took 75s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m19.200000s 0m5.350000s
--- shard 40 of 48 ---
==> shard 40 of 48: make browser.internal.gallery~16of18
./hack/gotest.sh browser 'internal.gallery~16of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 16 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	61.660s
suite: browser.internal.gallery~16of18 took 71s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m16.200000s 0m4.360000s
--- shard 41 of 48 ---
==> shard 41 of 48: make browser.internal.gallery~17of18
./hack/gotest.sh browser 'internal.gallery~17of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 17 of 18 of ./internal/gallery/ runs 5 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	66.903s
suite: browser.internal.gallery~17of18 took 77s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m18.810000s 0m5.630000s
--- shard 42 of 48 ---
==> shard 42 of 48: make browser.internal.gallery~18of18
./hack/gotest.sh browser 'internal.gallery~18of18'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 18 of 18 of ./internal/gallery/ runs 6 of 84 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery	68.070s
suite: browser.internal.gallery~18of18 took 77s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m20.380000s 0m6.290000s
--- shard 43 of 48 ---
==> shard 43 of 48: make browser.internal.gallery.history
./hack/gotest.sh browser 'internal.gallery.history'
gotest: on ip-172-31-17-65, driving /opt/amadan-browser/chromium-1234/chrome-linux/chrome
gotest: ./internal/gallery/history/ runs its 3 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/gallery/history	33.457s
suite: browser.internal.gallery.history took 39s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m21.110000s 0m2.110000s
--- shard 44 of 48 ---
==> shard 44 of 48: make browser.internal.www~1of4
./hack/gotest.sh browser 'internal.www~1of4'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 1 of 4 of ./internal/www/ runs 4 of 22 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/www	69.855s
suite: browser.internal.www~1of4 took 78s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m31.140000s 0m2.070000s
--- shard 45 of 48 ---
==> shard 45 of 48: make browser.internal.www~2of4
./hack/gotest.sh browser 'internal.www~2of4'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 2 of 4 of ./internal/www/ runs 6 of 22 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/www	65.666s
suite: browser.internal.www~2of4 took 74s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m45.000000s 0m2.590000s
--- shard 46 of 48 ---
==> shard 46 of 48: make browser.internal.www~3of4
./hack/gotest.sh browser 'internal.www~3of4'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 3 of 4 of ./internal/www/ runs 6 of 22 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/www	80.260s
suite: browser.internal.www~3of4 took 88s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m51.450000s 0m3.110000s
--- shard 47 of 48 ---
==> shard 47 of 48: make browser.internal.www~4of4
./hack/gotest.sh browser 'internal.www~4of4'
gotest: on ip-172-31-17-65, driving the harness's own choice (/usr/local/bin/chromium)
gotest: slice 4 of 4 of ./internal/www/ runs 6 of 22 browser tests
ok  	amadan.net/rastrillo/fiesta/internal/www	76.113s
suite: browser.internal.www~4of4 took 84s; CPU, user then system, of this shell and then of the role:
0m0.000000s 0m0.000000s
0m45.530000s 0m2.810000s
diff --git a/check/baseline_test.go b/check/baseline_test.go
index b138c45..0209ed3 100644
--- a/check/baseline_test.go
+++ b/check/baseline_test.go
@@ -135,6 +135,8 @@ var newOnOldMarkup = map[string]string{
".rst-seg-tabs > button": segTabButton,
".rst-seg-tabs > button:hover": segTabButton,
`.rst-seg-tabs > button[aria-pressed="true"]`: segTabButton,
+ "[rst-seg-tabs] > button:disabled": segTabButton,
+ ".rst-seg-tabs > button:disabled": segTabButton,
}
// segTabButton is each entry's why. Every entry uses the child
diff --git a/check/segtabs_browser_test.go b/check/segtabs_browser_test.go
index e4ae9db..3b6f059 100644
--- a/check/segtabs_browser_test.go
+++ b/check/segtabs_browser_test.go
@@ -21,11 +21,13 @@ import (
)
// segTabsTrack is one track holding the current link, a plain link,
-// the pressed button and an unpressed one, so each button is read
+// the pressed button, an unpressed one and a disabled one, so each
+// button is read
// beside the link it must look like, under the same rules.
const segTabsTrack = `<main rst-page><div rst-seg-tabs role="group" aria-label="View">` +
`<a id="current" href="#list" aria-current="page">List</a><a id="link" href="#grid">Grid</a>` +
`<button id="pressed" type="button" aria-pressed="true">List</button><button id="unpressed" type="button" aria-pressed="false">Grid</button>` +
+ `<button id="disabled" type="button" aria-pressed="false" disabled>Map</button>` +
`</div></main>`
// segTabsPages serves the track at /<theme>/<scheme>/ under tokens.css
@@ -120,6 +122,7 @@ func TestASegTabButtonLooksLikeASegTabLink(t *testing.T) {
}
forceState(t, ctx, "#link")
forceState(t, ctx, "#unpressed")
+ disabledLooksIdle(t, ctx, where, rest)
}
}
cancel()
@@ -152,3 +155,30 @@ func TestASegTabButtonLooksLikeASegTabLink(t *testing.T) {
mustRun(t, ctx, emulation.SetEmulatedMedia())
}
}
+
+// disabledLooksIdle: a disabled button says it is not listening, as
+// Fiesta's other disabled controls do: faint text, the default cursor,
+// and no answer to a hover. With the enabled tab's colour, pointer and
+// hover it read as a choice that would work, and a click did nothing.
+// rest is a plain link's resting colour, which the faint text must not
+// be, or the check below could not tell the two apart.
+func disabledLooksIdle(t *testing.T, ctx context.Context, where, rest string) {
+ t.Helper()
+ var faint string
+ at(t, ctx, `(() => { const p = document.createElement("span"); p.style.color = "var(--rst-text-faint)"; document.body.append(p); const c = getComputedStyle(p).color; p.remove(); return JSON.stringify(c); })()`, &faint)
+ faint = canonColours(faint)
+ if faint == rest {
+ t.Errorf("%s: CONTROL: the faint text colour is %s, a plain tab's own; a disabled button cannot be told from an enabled one by colour", where, faint)
+ }
+ if c := computed(t, ctx, "#disabled", "color"); c != faint {
+ t.Errorf("%s: a disabled button's text is %s, want the faint text colour %s", where, c, faint)
+ }
+ if c := computed(t, ctx, "#disabled", "cursor"); c != "default" {
+ t.Errorf("%s: a disabled button's cursor is %q, want \"default\": a pointer promises a click that does nothing", where, c)
+ }
+ forceState(t, ctx, "#disabled", "hover", "active")
+ if c := computed(t, ctx, "#disabled", "color"); c != faint {
+ t.Errorf("%s: a hovered, pressed disabled button turns %s; it must stay %s", where, c, faint)
+ }
+ forceState(t, ctx, "#disabled")
+}
diff --git a/check/selectors_test.go b/check/selectors_test.go
index 0d6b332..d3cf3d7 100644
--- a/check/selectors_test.go
+++ b/check/selectors_test.go
@@ -21,9 +21,10 @@ import (
// - an alternative is compounds joined by descendant, > or +;
// - a compound is an optional type selector, then classes, attribute
// selectors ([a], [a="v"], [a~="v"]), the pseudo-classes :hover,
-// :active, :focus-visible, :first-child, :last-child,
+// :active, :focus-visible, :disabled, :first-child, :last-child,
// :nth-child(An+B), :has() and :not(), and last ::before or
-// ::after;
+// ::after (a state like :disabled only narrows, and never stands
+// for a name);
// - :is(), :where(), * and anything else are outside it, except *
// inside a :not() argument, where it can only narrow.
@@ -333,7 +334,7 @@ func (p *selParser) attr() (attrSel, error) {
func (p *selParser) pseudo(inNot bool) (pseudo, error) {
ps := pseudo{Name: strings.ToLower(p.ident())}
switch ps.Name {
- case "hover", "active", "focus-visible", "first-child", "last-child":
+ case "hover", "active", "focus-visible", "disabled", "first-child", "last-child":
if p.peek() == '(' {
return ps, p.errorf("`:%s(` is outside the grammar", ps.Name)
}
@@ -566,7 +567,9 @@ func TestOnlyNewMarkupPassesTheGrammar(t *testing.T) {
{`.rst-\73nippet`, false, "escape"},
{`[rst-dropdown~=""]`, false, "matches nothing"},
{`.rst-page[rst-row]`, false, "positively requires"},
+ {"[rst-page] button:disabled", false, "positively requires"},
{"[rst-snippet]", true, ""},
+ {"[rst-snippet] > button:disabled", true, ""},
{"[rst-page-foot]:not(:has(> *))", true, ""},
{`[rst-row]:has(> [rst-status~="inline"]) > [rst-status]`, true, ""},
{"[rst-page-foot] [rst-dropdown]", true, ""},
diff --git a/css/tokens.css b/css/tokens.css
index 35002fd..0c6a3f0 100644
--- a/css/tokens.css
+++ b/css/tokens.css
@@ -2147,6 +2147,12 @@ small.rst-field__hint, small[rst-field-hint] { display: block; font-size: var(--
made whichever element made it.
No press rule, because a pressed tab has no fill today (A15). */
.rst-seg-tabs a[aria-current], [rst-seg-tabs] a[aria-current], .rst-seg-tabs > button[aria-pressed="true"], [rst-seg-tabs] > button[aria-pressed="true"] { background: var(--rst-surface); box-shadow: inset var(--rst-hl-x) 1px 0 var(--rst-depth-hl, transparent), var(--rst-shadow-lift); color: var(--rst-text); font-weight: 600; }
+/* A disabled button is not listening: faint text, as a disabled page
+ chip or calendar day has, and the default cursor, as a disabled
+ rst-btn has. It comes after the hover and the thumb, which weigh the
+ same, so neither a hover nor a pressed state brings back the colour
+ of a tab that would answer a click. */
+.rst-seg-tabs > button:disabled, [rst-seg-tabs] > button:disabled { color: var(--rst-text-faint); cursor: default; }
/* form layout — the interview rhythm and the save bar. */
.rst-form-flow > .rst-field + .rst-field, [rst-form-flow] > [rst-field] + [rst-field] { margin-top: var(--rst-sp-5); }