Conversation
Step A2 of #199. Every add-on's styles/content.css is aggregated into a generated .plone/content.css, which both the Public UI and the CMSUI loaders import first, inside the plone-content cascade layer. Add-ons write block styles once and get them in both user interfaces. Documents the convention, its authoring rules and how to override block styles.
This was referenced Oct 2, 2026
* a1-css-layer-order: Fix the server not loading translations, which broke hydration (#207)
* a1-css-layer-order: Move the table drag handle fragment to @plone/quanta Releasing @plone/aurora 1.0.0-alpha.16 Release @plone/contents 1.0.0-alpha.3 Release @plone/publicui 1.0.0-alpha.8 Release @plone/cmsui 1.0.0-alpha.11 Release @plone/agave 1.0.0-alpha.8 Release @plone/theming 1.0.0-alpha.8 Release @plone/layout 1.0.0-alpha.13 Release @plone/blocks 1.0.0-alpha.17 Release @plone/plate 1.0.0-alpha.22 Release @plone/react-router 2.0.0-alpha.7 Release @plone/helpers 2.0.0-alpha.9 Release @plone/registry 4.0.0-alpha.4 Release @plone/quanta 1.0.0-alpha.1 Release @plone/components 5.0.0-alpha.5 Release @plone/client 2.0.0-alpha.8 Release @plone/icons 1.0.0-alpha.1 Release @plone/types 3.0.0-alpha.7 Split Quanta and icons out of @plone/components into @plone/quanta and @plone/icons (#212)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step A2 of #199: a
styles/content.cssentry point in the add-on styles loader, so add-ons write block styles once and get them in both the Public UI and the CMSUI.Changes
@plone/registry(create-addons-styles-loader.ts):New generated file:
.plone/content.cssaggregates every add-on'sstyles/content.css, in add-on order. It emits no Tailwind@sourcelines, because content CSS is plain CSS by contract.Imported by both UIs: the generated
.plone/publicui.cssand.plone/cmsui.cssnow start with:Exports:
buildContentLoaderCode, plusCONTENT_STYLESHEETandCONTENT_LAYERconstants.styles/publicui.cssandstyles/cmsui.csswork exactly as before.__tests__/create-addons-styles-loader.test.js. Until now the styles loader had no tests. It covers:@sourcelines incontent.css, even for add-ons that use Tailwind;content.cssfirst, inplone-content;@sourcestill emitted for Tailwind add-ons in the UI loaders;.plone/.docs/conceptual-guides/add-on-styles-loader.md): a "Content styles" section covering:base-layer convention for theme resets;@layer-inside-content.csstrap.No add-on ships a
styles/content.cssyet. A3 adds the first ones, so this PR changes no rendered CSS: the content import is an empty file.Verified end to end
I built the app with temporary marker rules in
@plone/plate/styles/content.css(:where(.a2-marker)) and@plone/agave/styles/content.css(.a2-marker). Both built bundles then contain:So both UIs get the content styles, in the
plone-contentlayer, with the plate rule before the Agave rule. Tailwind v4 and Vite handle@import … layer()in the generated files, which settles the risk noted in #199. The markers aren't committed.Validation
pnpm --filter @plone/registry test --run: 125 passed, 7 of them new.pnpm --filter @plone/registry check:tsandbuild: clean.pnpm --filter @plone/aurora build: clean, with and without add-on content styles.pnpm --filter @plone/registry check:exportsfails, but with the same node10 resolution and CJS/ESM warnings on every subpath export of the package. That looks pre-existing and unrelated to this change.Part of #199.