@@ -125,3 +125,39 @@ body {
125125.pf-v6-c-form__label-text {
126126 --pf-v6-c-form__label-text--FontWeight : var (--pf-t--global--font--weight--400 );
127127}
128+
129+ /*
130+ PatternFly components align their children on the text baseline and relied on the
131+ PatternFly icons being 1em SVGs with `vertical-align: -0.125em`. Carbon icons are
132+ fixed-size SVGs without that offset, so they ride high next to the label.
133+ Center the element that holds the icon instead of depending on baselines:
134+ - `__icon`: the wrapper Button, MenuToggle, ToggleGroupItem and Label render for their `icon` prop.
135+ - the topology control bar passes its icon as a bare child, so it lands in `__text`.
136+ */
137+ /* stylelint-disable selector-class-pattern */
138+ .pf-v6-c-button .pf-v6-c-button__icon ,
139+ .pf-v6-c-menu-toggle .pf-v6-c-menu-toggle__icon ,
140+ .pf-v6-c-toggle-group .pf-v6-c-toggle-group__icon ,
141+ .pf-v6-c-label .pf-v6-c-label__icon ,
142+ .pf-topology-control-bar__button .pf-v6-c-button__text {
143+ display : flex ;
144+ align-items : center ;
145+ align-self : center ;
146+ justify-content : center ;
147+
148+ /*
149+ Keep the line box the icon used to occupy so icon-only buttons don't shrink to the 16px glyph.
150+ `--pf-v6-c-button--LineHeight` is only defined inside buttons, hence the global fallback.
151+ */
152+ min-block-size : calc (1em * var (--pf-v6-c-button--LineHeight , var (--pf-t--global--font--line-height--body )));
153+ }
154+
155+ /*
156+ Topology context menu items render `<Icon /> Label` as plain children, so the icon lands inline in
157+ `__item-text` instead of in a dedicated icon slot. Restore the baseline offset the PatternFly icons
158+ carried; a flex layout is avoided to keep the text ellipsis and the existing spacing untouched.
159+ */
160+ .pf-topology-context-menu__c-dropdown__menu .pf-v6-c-menu__item-text > svg {
161+ vertical-align : -0.125em ;
162+ }
163+ /* stylelint-enable selector-class-pattern */
0 commit comments