feat(elements): add h2-as-heading and h2-as-intro stylesheets - #683
feat(elements): add h2-as-heading and h2-as-intro stylesheets#683wesleyboar wants to merge 8 commits into
Conversation
core-styles.cms.css styles a bare <h2> as a large, accent-colored intro paragraph, a legacy pattern from CMS editors misusing <h2> instead of <p class="h2">. That default cannot change without breaking existing CMS content, so this adds two opt-in stylesheets instead: - core-styles.h2-as-heading.css: resets <h2> to a plain heading, for sites using <h2> correctly, loadable atop core-styles.cms.css today. - core-styles.h2-as-intro.css: reproduces cms.css's current <h2> treatment standalone, compiled from the same mixins so it can't drift. A no-op atop v2 today; published now so it is ready if that default ever changes. Neither affects .h2/p.h2, which is a separate, unscoped selector already.
Replace prose explanation with a permalink to the source file each patches against, plus a cross-reference to its sibling file.
PR Summary by QodoAdd opt-in h2 override stylesheets (plain heading vs CMS intro)
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
Move core-styles.h2-as-heading.css and core-styles.h2-as-intro.css into elements/ as unprefixed partials, matching where headings--cms.css itself lives and how every other elements/ file is named. Add two top-level stylesheets that import them and describe their purpose by migration direction rather than by CSS mechanism: - core-styles.v3-bridge-for-v2-users.css: imports h2-as-heading.css - core-styles.v2-bridge-for-v3-users.css: imports h2-as-intro.css This also lets each absorb future unrelated v2/v3 breaking changes under the same name, instead of accumulating one top-level file per fix. Also drops the now-outdated `:not(:--portal-content)` scoping from h2-as-intro.css (tup-ui no longer loads core-styles.cms.css); a follow-up PR will remove the same stale scoping from elements/headings--cms.css.
… feat/h2-as-heading-and-intro
Rename core-styles.v3-bridge-for-v2-users.css and core-styles.v2-bridge-for-v3-users.css to core-styles.cms.v3-bridge-for-v2-users.css and core-styles.cms.v2-bridge-for-v3-users.css, since both are specific to core-styles.cms.css's <h2> treatment, not a general v2/v3 difference.
…684) ## Overview Removes the `:not(:--portal-content)` scoping branch from `elements/headings--cms.css`, per its own long-standing TODO. <details> TACC/tup-ui no longer loads `core-styles.cms.css`, so the exclusion it called out no longer applies. </details> ## Related - follow-up from #683 ## Changes - **removed** `:--portal-content` use and definition ## Testing Skipped. Basic change, multiple places. > [!TIP] > I, @wesleyboar, human, verified TUP-UI's portal app does **not** load `….cms.css`. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Wesley B <wesleyboar@users.noreply.github.com>
Show how to append core-styles.cms.v3-bridge-for-v2-users.css atop core-styles.cms.css for projects preparing for v3 early.
Show how to append core-styles.cms.v2-bridge-for-v3-users.css atop core-styles.cms.css for v3 sites whose CMS content still uses <h2> as an intro paragraph. The stylesheet itself isn't added here — it'll arrive via the merge of main after TACC#683 lands, rather than being hand-ported.
Overview
Adds two opt-in stylesheets that let a site override how
core-styles.cms.cssstyles a bare<h2>, without changingcore-styles.cms.cssitself.Related
…
Changes
core-styles.h2-as-heading.css— resets a bare<h2>to a plain heading (browser defaults), for sites using<h2>correctly. Does not affect.h2/p.h2.core-styles.h2-as-intro.css— reproducescore-styles.cms.css's current<h2>treatment as a standalone file, compiled from the same mixins so it can't drift. No-op atop v2 today; published now so it's ready for sites that need it once that default changes.Testing
npm run build:cssgit status --short dist/— onlydist/core-styles.h2-as-heading.cssanddist/core-styles.h2-as-intro.cssshould appear; no otherdist/*.csschanges.Notes
No CHANGELOG entry (frozen) and no version bump, per current release-via-GitHub-Releases process.