[3.0] Document the theme's CSS naming conventions - #9379
Merged
Conversation
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
live627
approved these changes
Aug 8, 2026
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.
Description
Documents the theme's CSS naming conventions in
AGENTS.md, so that coding agents get them right the first time instead of being corrected in review.php-cs-fixeronly looks at PHP, so none of this is enforced automatically and nothing in the repository stated it. This came up in #9372, where the review asked forsnake_caseclass names instead of kebab-case.The new
### CSS namingsubsection records three things, each checked againstrelease-3.0rather than assumed:snake_case. 389 of the 392 class selectors inThemes/default/css/index.cssfollow this. The three that do not (.sceditor-container,.dz-image-preview,.g-recaptcha) are all owned by third-party code, so the section says explicitly that they are not a precedent for new classes — otherwise the next reader finds a kebab-case class and copies it.kebab-case(--body-bg,--primary-color-500), with a note not to "correct" them. The class-name rule is about class names only, and there are 209 kebab-case custom properties already in the theme.--component-property_variant. The variant is usually a state (--input-bg_hover,--button-border-color_active), but the same slot carries other modifiers where a component needs them (--progressbar-inner-bg_green,--genericbar-inner-box-shadow_vertical). 37 of the 246 custom properties use a suffix.Documentation only — no code, CSS or template changes, so nothing here affects the running forum.
Issues References (Fixes|Related|Closes)