Skip to content

fix: restore list markers in single-page docs - #139

Merged
oto-macenauer-absa merged 5 commits into
masterfrom
fix/single-page-list-markers
Nov 6, 2026
Merged

oto-macenauer-absa merged 5 commits into
masterfrom
fix/single-page-list-markers

Conversation

@oto-macenauer-absa

Copy link
Copy Markdown
Collaborator

What

Bullet and numbered lists in single-page docs had no markers in the knowledge base. Tailwind's Preflight, part of the knowledge base stylesheet, sets list-style: none on every list. The doc.css written by publish-single-page-docs gave lists margin and padding but no list-style-type, so nothing overrode Preflight. Opened on its own, the doc looked fine because Preflight isn't loaded there.

Changes

  • actions/publish-single-page-docs/src/template.js: DOC_CSS now sets disc → circle → square for nested ul, decimal for ol, and a muted ::marker colour. GFM task lists still have no marker, because their more specific rule wins.
  • src/styles/knowledge-base.css: the same markers, scoped to .kb-single-page, inside @layer base. This fixes bundles already published by older action versions without republishing them. The rule sits below kb-app, so a doc's own list styling still wins.
  • Tests:
    • The release-process fixture now has a three-level bullet list.
    • A new embedded test checks the computed list-style-type for ol, each ul level and a task list, in both the plain and pierced projects.
    • build-integrity checks that the fallback rule ships.
    • The action self-test checks that doc.css declares the markers.

Verification

  • With both CSS changes reverted, the new test fails: every list computes none.
  • With only the knowledge base fallback in place (old doc.css), it passes, which covers already-published bundles.
  • npm test: 420 passed. Standalone suite: 23 passed. Action self-test passes.

Closes #138

🤖 Generated with Claude Code

Tailwind's Preflight in the knowledge base stylesheet sets
`list-style: none` on every list, and the action's doc.css set only
margin and padding, so bullets and numbers vanished once a doc was
re-hosted.

- doc.css now declares disc/circle/square for nested `ul`, decimal for
  `ol`, and a muted marker colour; task lists stay unmarked.
- knowledge-base.css adds the same markers in the `base` layer, scoped to
  `.kb-single-page`, so bundles published by older action versions render
  correctly without a republish. Being below `kb-app`, it never overrides
  a doc's own list styling.
- The release-process fixture gains a three-level bullet list, and an
  embedded test asserts the computed list-style-type of each level and of
  a task list.

Closes #138

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oto-macenauer-absa added a commit that referenced this pull request Nov 6, 2026
## What

The `Image build + integration + scan` job fails on every branch,
including #139, because Trivy reports a critical CVE in the runtime base
image:

| Package | CVE | Installed | Fixed |
|---|---|---|---|
| `brotli-libs` | CVE-2026-111497 (CRITICAL) | 1.2.0-r0 | 1.2.1-r0 |

The pinned `nginx-unprivileged:1.29-alpine` tag has not been rebuilt
since May. Even the current `1.31-alpine` image still ships the
vulnerable package; the fix is only in the Alpine repositories so far.

## Changes

- `Dockerfile`:
- Bump the base image to `nginx-unprivileged:1.31-alpine` (nginx 1.31.7,
Alpine 3.24), still pinned by digest.
- Run `apk upgrade --no-cache` as root, then switch back to UID 101.
Alpine security fixes then land without waiting for an upstream rebuild.
- `.github/dependabot.yml`: add the `docker` ecosystem. The Dockerfile
comment said Dependabot bumps the tag, but no ecosystem was configured,
which is how the base image went stale.

## Verification

Run locally against the image built from this branch:

- `npm run test:container`: 37 passed against the real image.
- Trivy 0.70 (the version CI uses), `--severity CRITICAL,HIGH
--ignore-unfixed`: 0 findings. Before this change, the old image had 1
critical finding, and plain `1.31-alpine` had 8 (1 critical, 7 high).
- The container still runs as `uid=101(nginx)`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The computed-style test does not exercise the legacy-bundle fallback because updated fixture CSS overrides it, leaving incorrect or missing decimal, circle, and square marker declarations undetected.

1 open issue
What changed in this PR

Restores bullets and numbering in single-page documentation, addressing #138 for both newly published bundles and older bundles without republishing.

Changes:

  • Adds nested bullet styles, decimal numbering, and muted marker colors to generated document CSS.
  • Adds a lower-priority knowledge base fallback that preserves document-specific list styles.
  • Extends fixtures and tests to check list markers and marker-free task lists.
File Description
tests/​web-fragment.spec.js Checks computed list styles in embedded documentation.
tests/​fixtures/​single-page-bundle/​release-process/​index.html Adds a three-level bullet-list fixture.
tests/​fixtures/​single-page-bundle/​release-process/​assets/​doc.css Updates fixture marker styles.
tests/​fixtures/​single-page-bundle/​platform-overview/​assets/​doc.css Updates fixture marker styles.
tests/​build-integrity.spec.js Checks that fallback bullet styling ships.
src/​styles/​knowledge-base.css Adds scoped fallback markers for older bundles.
scripts/​setup-test-apps.mjs Generates the nested-list fixture content.
actions/​publish-single-page-docs/​src/​template.js Declares list markers and marker colors in published CSS.
actions/​publish-single-page-docs/​src/​selftest.js Checks generated bullet and numbering declarations.

Review effort: Balanced

Comment thread src/styles/knowledge-base.css Resolved
Both fixture docs shipped the current doc.css, whose kb-app marker rules
override the knowledge base's base-layer fallback, so the computed-style
test passed whether or not the fallback worked. release-process now ships
the doc.css as published before it declared markers (task-list rules kept)
plus a task list; the fragment test checks decimal/disc/circle/square and
the unmarked task list against it in both embeddings, and build-integrity
asserts all four fallback rules and that the fixture really is legacy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@tmikula-dev tmikula-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Approving

@oto-macenauer-absa
oto-macenauer-absa merged commit f95eb35 into master Nov 6, 2026
8 checks passed
@oto-macenauer-absa
oto-macenauer-absa deleted the fix/single-page-list-markers branch November 6, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Single-page docs render lists without bullets or numbers

3 participants