File tree Expand file tree Collapse file tree 5 files changed +43
-5
lines changed
gallery/src/pages/components Expand file tree Collapse file tree 5 files changed +43
-5
lines changed Original file line number Diff line number Diff line change @@ -64,4 +64,4 @@ Check the [webawesome documentation](https://webawesome.com/docs/components/butt
6464** CSS Custom Properties**
6565
6666- ` --ha-button-height ` - Height of the button.
67- - ` --ha-button-radius ` - Border radius of the button. Defaults to ` var(--wa -border-radius-pill) ` .
67+ - ` --ha-button-border- radius ` - Border radius of the button. Defaults to ` var(--border-radius-pill) ` .
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export type Appearance = "accent" | "filled" | "outlined" | "plain";
2727 * @csspart spinner - The spinner that shows when the button is in the loading state.
2828 *
2929 * @cssprop --ha-button-height - The height of the button.
30- * @cssprop --ha-button-radius - The border radius of the button. defaults to `var(--wa -border-radius-pill)`.
30+ * @cssprop --ha-button-border- radius - The border radius of the button. defaults to `var(--border-radius-pill)`.
3131 *
3232 * @attr {("small"|"medium")} size - Sets the button size.
3333 * @attr {("brand"|"neutral"|"danger"|"warning"|"success")} variant - Sets the button color variant. "primary" is default.
@@ -55,10 +55,9 @@ export class HaButton extends Button {
5555 /* set theme vars */
5656 --wa-form-control-padding-inline : 16px ;
5757 --wa-font-weight-action : var (--ha-font-weight-medium );
58- --wa-border-radius-pill : 9999px ;
5958 --wa-form-control-border-radius : var (
60- --ha-button-radius ,
61- var (--wa- border-radius-pill )
59+ --ha-button-border- radius ,
60+ var (--border-radius-pill )
6261 );
6362
6463 --wa-form-control-height : var (
Original file line number Diff line number Diff line change @@ -20,6 +20,18 @@ export class HaFab extends FabBase {
2020 - - mdc- typography- butto n- font- family: var(- - ha- font- family- body);
2121 - - mdc- typography- butto n- font- weight: var(- - ha- font- weight- medium);
2222 }
23+ : host .mdc-fab--extended {
24+ border-radius : var (
25+ --ha-button-border-radius ,
26+ var (--border-radius-pill )
27+ );
28+ }
29+ : host .mdc-fab .mdc-fab--extended .ripple {
30+ border-radius : var (
31+ --ha-button-border-radius ,
32+ var (--border-radius-pill )
33+ );
34+ }
2335 : host .mdc-fab--extended .mdc-fab__icon {
2436 margin-inline-start : -8px ;
2537 margin-inline-end : 12px ;
Original file line number Diff line number Diff line change 1+ import { css } from "lit" ;
2+ import { extractDerivedVars } from "../../common/style/derived-css-vars" ;
3+
4+ export const coreStyles = css `
5+ html {
6+ --border-width-sm : 1px ;
7+ --border-width-md : 2px ;
8+ --border-width-lg : 3px ;
9+
10+ --border-radius-sm : 4px ;
11+ --border-radius-md : 8px ;
12+ --border-radius-lg : 12px ;
13+ --border-radius-xl : 16px ;
14+ --border-radius-2xl : 24px ;
15+ --border-radius-3xl : 28px ;
16+ --border-radius-4xl : 32px ;
17+ --border-radius-5xl : 36px ;
18+ --border-radius-pill : 9999px ;
19+ --border-radius-circle : 50% ;
20+ --border-radius-square : 0 ;
21+ }
22+ ` ;
23+
24+ export const coreDerivedVariables = extractDerivedVars ( coreStyles ) ;
Original file line number Diff line number Diff line change 11import { fontStyles } from "../roboto" ;
22import { colorDerivedVariables , colorStylesCollection } from "./color" ;
3+ import { coreDerivedVariables , coreStyles } from "./core.globals" ;
34import { mainDerivedVariables , mainStyles } from "./main.globals" ;
45import {
56 typographyDerivedVariables ,
89import { waMainDerivedVariables , waMainStyles } from "./wa.globals" ;
910
1011export const themeStyles = [
12+ coreStyles . toString ( ) ,
1113 mainStyles . toString ( ) ,
1214 typographyStyles . toString ( ) ,
1315 ...colorStylesCollection ,
@@ -16,6 +18,7 @@ export const themeStyles = [
1618] . join ( "" ) ;
1719
1820export const derivedStyles = {
21+ ...coreDerivedVariables ,
1922 ...mainDerivedVariables ,
2023 ...typographyDerivedVariables ,
2124 ...colorDerivedVariables ,
You can’t perform that action at this time.
0 commit comments