@@ -48,13 +48,6 @@ const button = css`
4848 --lumo-button-size : var ( --lumo-size-l ) ;
4949 }
5050
51- /* This needs to be the last selector for it to take priority */
52- : host ( [disabled ][disabled ]) {
53- pointer-events : none;
54- color : var ( --lumo-disabled-text-color ) ;
55- background-color : var ( --lumo-contrast-5pct ) ;
56- }
57-
5851 /* For interaction states */
5952 : host :: before ,
6053 : host :: after {
@@ -114,7 +107,6 @@ const button = css`
114107 : host ( [theme ~= 'tertiary' ]) ,
115108 : host ( [theme ~= 'tertiary-inline' ]) {
116109 background-color : transparent !important ;
117- transition : opacity 0.2s ;
118110 min-width : 0 ;
119111 }
120112
@@ -147,11 +139,6 @@ const button = css`
147139 min-width : calc ( var ( --lumo-button-size ) * 2.5 ) ;
148140 }
149141
150- : host ( [theme ~= 'primary' ][disabled ]) {
151- background-color : var ( --lumo-primary-color-50pct ) ;
152- color : var ( --lumo-primary-contrast-color ) ;
153- }
154-
155142 : host ( [theme ~= 'primary' ]) :: before {
156143 background-color : black;
157144 }
@@ -181,10 +168,6 @@ const button = css`
181168 color : var ( --lumo-success-contrast-color ) ;
182169 }
183170
184- : host ( [theme ~= 'success' ][theme ~= 'primary' ][disabled ]) {
185- background-color : var ( --lumo-success-color-50pct ) ;
186- }
187-
188171 : host ( [theme ~= 'error' ]) {
189172 color : var ( --lumo-error-text-color ) ;
190173 }
@@ -194,10 +177,6 @@ const button = css`
194177 color : var ( --lumo-error-contrast-color ) ;
195178 }
196179
197- : host ( [theme ~= 'error' ][theme ~= 'primary' ][disabled ]) {
198- background-color : var ( --lumo-error-color-50pct ) ;
199- }
200-
201180 : host ( [theme ~= 'contrast' ]) {
202181 color : var ( --lumo-contrast ) ;
203182 }
@@ -207,8 +186,20 @@ const button = css`
207186 color : var ( --lumo-base-color ) ;
208187 }
209188
210- : host ( [theme ~= 'contrast' ][theme ~= 'primary' ][disabled ]) {
211- background-color : var ( --lumo-contrast-50pct ) ;
189+ /* Disabled state. Keep selectors after other color variants. */
190+
191+ : host ( [disabled ]) {
192+ pointer-events : none;
193+ color : var ( --lumo-disabled-text-color ) ;
194+ }
195+
196+ : host ( [theme ~= 'primary' ][disabled ]) {
197+ background-color : var ( --lumo-contrast-30pct ) ;
198+ color : var ( --lumo-base-color ) ;
199+ }
200+
201+ : host ( [theme ~= 'primary' ][disabled ]) [part ] {
202+ opacity : 0.7 ;
212203 }
213204
214205 /* Icons */
0 commit comments