Support side border shorthands in CSSBorder#4966
Merged
shai-almog merged 2 commits intoMay 16, 2026
Merged
Conversation
Removes the non-spec border-width-<side>/border-style-<side>/ border-color-<side> aliases (CSS only defines border-<side>-width etc.), wraps borderSide() in the same try/catch + Log.e pattern used by borderStyle(), and adds a longhand-decorator regression test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
|
Thanks! |
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.
This adds support for side-specific CSS border shorthands in
CSSBorder.Context: the Initializr template CSS uses declarations such as:
This is accepted by the regular Designer/Maven CSS compiler, but the lightweight
CSSThemeCompilerpaths used by Initializr preview / agent validation eventually pass this declaration toCSSBorder, where it fails with:The issue is that
CSSBordersupported general border properties such asborder-width,border-style, andborder-color, but not side-specific shorthand properties like:border-topborder-rightborder-bottomborder-leftThis PR adds support for those side-specific border shorthands, plus the corresponding side-specific longhands such as
border-bottom-width,border-bottom-style, andborder-bottom-color.I also added a regression test covering:
Verification:
Results:
CSSThemeCompilerTest: 5 tests, 0 failures, 0 errorsCSSBorderTest+BorderAndPlafTest: 18 tests, 0 failures, 0 errors