You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
New admin styles are affecting styling of some components #75855
changed the title [-]New admin style has influenced style of some components.[/-][+]New admin style has influenced style of some components[/+]on Feb 24, 2026
changed the title [-]New admin style has influenced style of some components[/-][+]New admin styles are affecting styling of some components[/+]on Feb 24, 2026
It'd be good to get a better understanding of the full scope of potential impact of the change. Since the change seems to be motivated by alignment with many of these components, that would hopefully mitigate some divergence. I'd be curious if @fabiankaegy might be able to weigh in on potential impact, as the author of the original changes.
In my local investigation, my initial impression is that it may be limited to line-height, and specifically to SelectControl and FormTokenControl. I was also concerned about the min-height and padding changes, but AFAICT the components that would be impacted define their own styles which would supersede those on the bare element selector styles.
This also seems to reaffirm some past discussion about components being responsible for defining their own typographical styles to be more resilient to outside influence like this. It seems like FormTokenField and SelectControl would already be prone to this, since the line-height already existed in these form styles (and inherited into the component styles), just that the value was changed.
Unfortunately I'm seeing a lot of breakage (not necessarily due to the recent changes) in @wordpress/ui components due to the common and form stylesheets. It's unfortunate that we not only have to continue working with these wildly overscoped styles being loaded everywhere, but that we are going to continue changing them, which can alter all our UIs (not just first-party component libraries) in unexpected ways. This is not very sustainable.
Aside from making hot fixes on the @wordpress/components side for 7.0, I wonder if we can add an opt-out scope to these common/form stylesheets? For example:
:where(:not([data-no-forms-css])){/* The current content of forms.css */}
Otherwise, placing them in an @layer may also mitigate specificity issues.
Without either of these, it's going to be a nightmare to counteract within @wordpress/ui (mostly because we are placing styles in @layers — these will always lose to the unlayered styles in common/forms.css).
@mirka that could work, it's non-invasive for existing code, and it allows us to easily opt out.
Still, I believe we should add as many styles as possible to our components to reduce the risk that they render differently dependending on the CSS environment surrounding them
Activity
[-]New admin style has influenced style of some components.[/-][+]New admin style has influenced style of some components[/+][-]New admin style has influenced style of some components[/-][+]New admin styles are affecting styling of some components[/+]mirka commentedon Feb 24, 2026
Also confirmed in Storybook by using the global style injector:
I guess I'll keep this my default setting for a while, to increase the chances of catching other issues.
ciampo commentedon Feb 24, 2026
Given this is quite high-priority as a 7.0 bug fix, should we establish who's going to work on a fix?
aduth commentedon Feb 24, 2026
It'd be good to get a better understanding of the full scope of potential impact of the change. Since the change seems to be motivated by alignment with many of these components, that would hopefully mitigate some divergence. I'd be curious if @fabiankaegy might be able to weigh in on potential impact, as the author of the original changes.
In my local investigation, my initial impression is that it may be limited to
line-height, and specifically toSelectControlandFormTokenControl. I was also concerned about themin-heightandpaddingchanges, but AFAICT the components that would be impacted define their own styles which would supersede those on the bare element selector styles.This also seems to reaffirm some past discussion about components being responsible for defining their own typographical styles to be more resilient to outside influence like this. It seems like
FormTokenFieldandSelectControlwould already be prone to this, since theline-heightalready existed in these form styles (and inherited into the component styles), just that the value was changed.t-hamano commentedon Feb 24, 2026
I'm having the same result. I've tested the entire component, and so fa,r those two seem to be the only issues we need to fix.
ciampo commentedon Feb 24, 2026
Cool, so it seems like a relatively localized fix, and one that we would apply regardless of this specific report
mirka commentedon Feb 25, 2026
Unfortunately I'm seeing a lot of breakage (not necessarily due to the recent changes) in
@wordpress/uicomponents due to thecommonandformstylesheets. It's unfortunate that we not only have to continue working with these wildly overscoped styles being loaded everywhere, but that we are going to continue changing them, which can alter all our UIs (not just first-party component libraries) in unexpected ways. This is not very sustainable.Aside from making hot fixes on the
@wordpress/componentsside for 7.0, I wonder if we can add an opt-out scope to thesecommon/formstylesheets? For example:Otherwise, placing them in an
@layermay also mitigate specificity issues.Without either of these, it's going to be a nightmare to counteract within
@wordpress/ui(mostly because we are placing styles in@layers — these will always lose to the unlayered styles in common/forms.css).ciampo commentedon Feb 25, 2026
@mirka that could work, it's non-invasive for existing code, and it allows us to easily opt out.
Still, I believe we should add as many styles as possible to our components to reduce the risk that they render differently dependending on the CSS environment surrounding them