@@ -263,8 +263,10 @@ export const euiButtonGroupButtonsStyles = (euiThemeContext: UseEuiTheme) => {
263263
264264 ${ segmentedChildrenStyles }
265265
266- * : where (.euiButton , .euiButtonIcon ): is (${ euiDisabledSelector } ) {
267- background-color : transparent;
266+ * : where (.euiButton , .euiButtonIcon ) {
267+ & : where (: is (${ euiDisabledSelector } ): not ([aria-pressed = 'true' ])) {
268+ background-color : transparent;
269+ }
268270 }
269271
270272 & : where ([data-dividers = 'true' ] & ) {
@@ -316,20 +318,22 @@ export const euiButtonGroupButtonsStyles = (euiThemeContext: UseEuiTheme) => {
316318
317319 & : where ([data-variant = 'selection' ][data-display = 'regular' ] & ) {
318320 * : where (.euiButton , .euiButtonIcon ): is ([aria-pressed = 'true' ]) {
319- background-color : ${ euiTheme . colors . backgroundLightText } ;
321+ & : not (: is (${ euiDisabledSelector } )) {
322+ background-color : ${ euiTheme . colors . backgroundLightText } ;
320323
321- ${ highContrastModeStyles ( euiThemeContext , {
322- none : `
323- background-color: ${ euiTheme . colors . backgroundLightText } ;
324- ` ,
325- preferred : `
326- border: ${ euiTheme . border . thin } ;
327- ` ,
328- forced : `
329- background-color: ${ euiTheme . colors . fullShade } ;
330- border: none;
331- ` ,
332- } ) }
324+ ${ highContrastModeStyles ( euiThemeContext , {
325+ none : `
326+ background-color: ${ euiTheme . colors . backgroundLightText } ;
327+ ` ,
328+ preferred : `
329+ border: ${ euiTheme . border . thin } ;
330+ ` ,
331+ forced : `
332+ background-color: ${ euiTheme . colors . fullShade } ;
333+ border: none;
334+ ` ,
335+ } ) }
336+ }
333337 }
334338 }
335339
@@ -343,6 +347,10 @@ export const euiButtonGroupButtonsStyles = (euiThemeContext: UseEuiTheme) => {
343347 ` ,
344348 } ) }
345349 }
350+
351+ * : where (.euiButton , .euiButtonIcon ): is (${ euiDisabledSelector } ) {
352+ background-color : transparent;
353+ }
346354 }
347355 ` ,
348356 noWrap : css `
@@ -454,7 +462,7 @@ const _highContrastStyles = (euiThemeContext: UseEuiTheme) => {
454462 color: ${ euiTheme . colors . emptyShade } ;
455463 background-color: ${ euiTheme . colors . fullShade } ;
456464
457- &:is(:hover, :focus):not(${ euiDisabledSelector } ) {
465+ &:is(:hover, :focus):not(:is( ${ euiDisabledSelector } ) ) {
458466 &::before {
459467 border-color: ${ euiTheme . colors . textInverse } ;
460468 }
0 commit comments