Skip to content

feat(ui): ship every package's styles as comark-ui/style.css - #383

Merged
vite-hub[bot] merged 7 commits into
mainfrom
feat/ui-stylesheet
Nov 9, 2026
Merged

vite-hub[bot] merged 7 commits into
mainfrom
feat/ui-stylesheet

Conversation

@onmax

@onmax onmax commented Nov 7, 2026

Copy link
Copy Markdown
Owner

A server-rendered page that uses comark-ui has no single stylesheet to import, and importing each package's style.css into the app's CSS fails the build. @vite-hub/docs works around it by concatenating the sheets itself and serving them as a hashed public file.

The build fails in two tools, neither of them because of the @supports rule alone:

  • Vite 8 minifies CSS with lightningcss 1.33, which throws Unexpected token Function("anchored") on comark-time's @container anchored(fallback:--ctm-below) query. Minimal input: @container anchored(fallback:--b){.p{color:red}}.
  • Nuxt runs autoprefixer 10.6.1, which throws Unknown node type in node creation on a property test followed by selector(). Minimal input: @supports (display:grid) and selector(:has(a)){a{color:red}}. The same tests the other way round, @supports selector(:has(a)) and (display:grid), parse. The disclosure motion in 7 packages starts with (interpolate-size:allow-keywords) and selector(::details-content).

This PR adds comark-ui/style.css, written by the package build: every dependency's style.css and the Mermaid wrapper's styles, each in the comark layer. The disclosure motion now tests selector(::details-content) first, which browsers read the same way. comark-time's style.css leaves out the anchored query. The components and the HTML renderer still inline it, so only a page that has nothing but the stylesheet loses the flipped grow direction when the tooltip opens below the text.

I checked it with a minimal Vite 8.3.6 app that imports the sheets:

Setup 33 sheets from main comark-ui/style.css
Vite defaults lightningcss throws on anchored( builds
@tailwindcss/vite 4.3.4 lightningcss throws on anchored( builds
postcss with autoprefixer 10.6.1 and cssnano 8.0.10, as Nuxt runs autoprefixer throws builds

packages/ui/test/style.test.ts reads the file through the package's exports, checks it holds each package's sheet, and runs it through lightningcss and autoprefixer. A fixture rendered with comark-ui/html matches main pixel for pixel in light, .dark, and system dark. pnpm ready passes.

cssnano still prints postcss-calc warnings for the sheet; #381 fixes those.

A server-rendered page had no single stylesheet to import, and adding each
package's style.css to an app's CSS broke its build:

- Vite 8 minifies CSS with lightningcss 1.33, which throws on comark-time's
  `@container anchored(...)` query.
- Nuxt runs autoprefixer 10.6, which throws "Unknown node type in node
  creation" on `@supports (prop:value) and selector(...)`.

The package build now writes comark-ui/style.css: every dependency's
style.css and the Mermaid wrapper's styles, all in the comark layer. The
disclosure motion tests `selector(::details-content)` first, and
comark-time's style.css leaves out the anchored query, which the components
and the HTML renderer still inline.
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-07T11:37:52.101850Z
We couldn’t complete this review. Comment @codex review to try again.
769db17 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@pullfrog pullfrog Bot 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.

Important

The new aggregate stylesheet makes comark-ui's direct build depend on pre-existing dependency artifacts, so clean package builds fail and incremental ones can publish stale CSS.

Reviewed changes in 769db17, covering the aggregate stylesheet export, dependency CSS discovery, compatibility changes for lightningcss and autoprefixer, public documentation, and artifact-level tests.

  • Aggregate stylesheet — emits every workspace dependency's exported style.css plus the Mermaid wrapper CSS as comark-ui/style.css.
  • CSS compatibility — keeps comark-time's anchored query in inline component/HTML styles while omitting it from the published sheet, and reorders disclosure feature tests for autoprefixer 10.6.
  • Public contract and tests — adds the package export and side-effect-safe SSR guidance, then verifies CSS inclusion, layering, and parser compatibility through public exports.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread packages/ui/tsdown.config.ts Resolved
@pkg-pr-new

pkg-pr-new Bot commented Nov 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/comark-annotate@383

comark-badge

pnpm add https://pkg.pr.new/comark-badge@383

comark-cards

pnpm add https://pkg.pr.new/comark-cards@383

comark-carousel

pnpm add https://pkg.pr.new/comark-carousel@383

comark-cast

pnpm add https://pkg.pr.new/comark-cast@383

comark-charts

pnpm add https://pkg.pr.new/comark-charts@383

comark-chat

pnpm add https://pkg.pr.new/comark-chat@383

comark-chips

pnpm add https://pkg.pr.new/comark-chips@383

comark-cjk

pnpm add https://pkg.pr.new/comark-cjk@383

comark-code

pnpm add https://pkg.pr.new/comark-code@383

comark-code-notes

pnpm add https://pkg.pr.new/comark-code-notes@383

comark-colors

pnpm add https://pkg.pr.new/comark-colors@383

comark-comments

pnpm add https://pkg.pr.new/comark-comments@383

comark-critic

pnpm add https://pkg.pr.new/comark-critic@383

comark-deflist

pnpm add https://pkg.pr.new/comark-deflist@383

comark-details

pnpm add https://pkg.pr.new/comark-details@383

comark-diagrams

pnpm add https://pkg.pr.new/comark-diagrams@383

comark-diff

pnpm add https://pkg.pr.new/comark-diff@383

comark-embed

pnpm add https://pkg.pr.new/comark-embed@383

comark-fields

pnpm add https://pkg.pr.new/comark-fields@383

comark-figure

pnpm add https://pkg.pr.new/comark-figure@383

comark-file-tree

pnpm add https://pkg.pr.new/comark-file-tree@383

comark-footnotes

pnpm add https://pkg.pr.new/comark-footnotes@383

comark-github

pnpm add https://pkg.pr.new/comark-github@383

comark-icon

pnpm add https://pkg.pr.new/comark-icon@383

comark-include

pnpm add https://pkg.pr.new/comark-include@383

comark-keys

pnpm add https://pkg.pr.new/comark-keys@383

comark-links

pnpm add https://pkg.pr.new/comark-links@383

comark-linter

pnpm add https://pkg.pr.new/comark-linter@383

comark-magic-move

pnpm add https://pkg.pr.new/comark-magic-move@383

comark-mark

pnpm add https://pkg.pr.new/comark-mark@383

markdown-it-to-comark

pnpm add https://pkg.pr.new/markdown-it-to-comark@383

marked-to-comark

pnpm add https://pkg.pr.new/marked-to-comark@383

comark-mathml

pnpm add https://pkg.pr.new/comark-mathml@383

comark-media

pnpm add https://pkg.pr.new/comark-media@383

comark-metrics

pnpm add https://pkg.pr.new/comark-metrics@383

migrate-to-comark

pnpm add https://pkg.pr.new/migrate-to-comark@383

comark-outline

pnpm add https://pkg.pr.new/comark-outline@383

comark-properties

pnpm add https://pkg.pr.new/comark-properties@383

comark-qr

pnpm add https://pkg.pr.new/comark-qr@383

comark-quiz

pnpm add https://pkg.pr.new/comark-quiz@383

comark-reading-time

pnpm add https://pkg.pr.new/comark-reading-time@383

remark-to-comark

pnpm add https://pkg.pr.new/remark-to-comark@383

comark-sources

pnpm add https://pkg.pr.new/comark-sources@383

comark-steps

pnpm add https://pkg.pr.new/comark-steps@383

comark-table

pnpm add https://pkg.pr.new/comark-table@383

comark-tabs

pnpm add https://pkg.pr.new/comark-tabs@383

comark-tests

pnpm add https://pkg.pr.new/comark-tests@383

comark-time

pnpm add https://pkg.pr.new/comark-time@383

comark-ui

pnpm add https://pkg.pr.new/comark-ui@383

comark-xref

pnpm add https://pkg.pr.new/comark-xref@383

comark-zoom

pnpm add https://pkg.pr.new/comark-zoom@383

commit: 769db17

@vite-hub

vite-hub Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Completed 2026-11-09T17:52:16.757Z 14m 48s
View session Failed 2026-11-09T06:57:07.354Z 1h 0m
View session Last seen running 2026-11-09T06:34:52.428Z 2s
View session Waiting 2026-11-09T03:10:33.984Z 11m 26s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Waiting for GitHub merge request 81d81926-4cc4-4b25-ab46-9e3ebb7f897f.

View session

Pushed d59d0ad, resolving README and lockfile conflicts. Frozen dependency refresh, direct comark-ui build, focused lint, stylesheet tests (3), time tests (34), and the previously failing rail Playwright case passed. Base-CI comparison was unavailable because main moved. Pullfrog: no valid findings. Awaiting hosted checks.

View session

Network error; retrying the pass.

Session

CI reconciliation completed; the same-head repair budget is exhausted.

Session

CI reconciliation completed; the same-head repair budget is exhausted.

View session

No repair warranted. Docs CI failed on GitHub avatar HTTP 504s; all three URLs now return 200. Focused vp lint passed. Stylesheet/time tests require missing dist artifacts; pnpm build setup failed because prepare writes protected .git/config. Pullfrog’s dependency-freshness finding is fixed in a63e25a and its thread is resolved. Checkout remains clean; awaiting successful required checks.

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes since the prior Pullfrog review, covering the fix for dependency stylesheet freshness in direct comark-ui builds.

  • Refreshed dependency styles — changed the package build to rebuild all workspace dependencies before loading the tsdown config, eliminating clean-build failures and stale aggregate CSS.
  • Verified the direct path — confirmed the dependency filter excludes comark-ui itself, the direct package build completes, and the aggregate stylesheet tests pass.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pullfrog pullfrog Bot 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.

✅ No new P0 or P1 issues found.

Reviewed changes since the last reviewed version, covering the latest reconciliation with main.

  • Preserved CSS compatibility — kept the selector-first disclosure feature query while reconciling its explanatory comment with the updated base.
  • Reconciled dependency catalogs — adopted main’s autoprefixer 10.6.2 catalog entry while retaining the aggregate stylesheet’s lightningcss dependency and generated lockfile state.
  • Maintained the stylesheet contract — confirmed the merge does not change the previously reviewed comark-ui/style.css generation or direct-build behavior.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pullfrog

pullfrog Bot commented Nov 9, 2026

Copy link
Copy Markdown

No configured credential can serve this run. Your ChatGPT subscription has hit its usage limit, which resets at 2026-11-13 17:11 UTC. Re-trigger after it resets, or add an API key for this provider, which Pullfrog falls back to automatically.

The providers' responses
CODEX_AUTH_JSON: the ChatGPT plan's usage limit is reached

Pick another model →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using gpt-6.1-sol

@vite-hub
vite-hub Bot merged commit de797e0 into main Nov 9, 2026
1 of 2 checks passed
@vite-hub
vite-hub Bot deleted the feat/ui-stylesheet branch November 9, 2026 18:31
@github-actions github-actions Bot mentioned this pull request Nov 9, 2026
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.

1 participant