Skip to content

Conversation

@lubber-de
Copy link
Member

@lubber-de lubber-de commented Mar 8, 2025

Description

As discussed in #2407 this PR renames header to heading.

  • rename all .ui.header selectors to .ui.heading
  • rename all @header... LESS variables to @heading...
  • rename all related files for building to heading as well (so header.less and header.variables dont exists anymore)

A new variation variable is introduced: @variationHeadingLegacyHeader (default false)
When set to true, it will generate the old .header classes in addition to the .heading classes for easier migration (but will double all selectors which increases css filesize)

This is a HUGE BREAKING CHANGE as

  • custom themes won't work when they override @header... variables as those do not exist anymore
  • headings won't be built anymore unless "header" is renamed to "heading" in each custom theme.config and each custom semantic.json
  • existing projects wont render headings properly unless all header usages are replaced by heading class usages

Still to be decided / taken into consideration

I leave this PR as draft for now as we still have to check/decide how to deal with other "header" usages in other components:

  • The th tag in a table is still a "header", not a "heading". However the table component shares the same @heading variables as the heading element itself. This is inconsistent, i think there are dedicated new variables needed
  • There are accordion, popup, message, toast, modal, flyout, list item, menu item, ... which all have/use a header (which either is a "heading", a "title" or still a "header"

If this gets merged, we may announce all upcoming breaking changes (espcially this one) long before 2.10.0 gets released, so people are prepared.

@lubber-de lubber-de added lang/css Anything involving CSS state/awaiting-reviews Pull requests which are waiting for reviews tag/breaking-change Any pull request which is waiting for a breaking change release labels Mar 8, 2025
@lubber-de lubber-de added this to the 2.10.0 milestone Mar 8, 2025
@lubber-de lubber-de added the state/awaiting-docs Pull requests which need doc changes/additions label Mar 8, 2025
Copy link
Member

@ko2in ko2in left a comment

Choose a reason for hiding this comment

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

The following themes still have old file names header.overrides and header.variables:

  • classic
  • github
  • material

@lubber-de
Copy link
Member Author

@ko2in Thanks! fixed in f66a9fb

@ko2in
Copy link
Member

ko2in commented Mar 16, 2025

LGTM.

# Conflicts:
#	src/themes/classic/collections/table.variables
#	src/themes/github/collections/menu.variables
# Conflicts:
#	src/definitions/elements/heading.less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang/css Anything involving CSS state/awaiting-docs Pull requests which need doc changes/additions state/awaiting-reviews Pull requests which are waiting for reviews tag/breaking-change Any pull request which is waiting for a breaking change release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants