Filip Wiesner
04/16/2023, 6:43 PMextraModifiers
) is there even if I add the modifier after the textfield style.Filip Wiesner
04/16/2023, 6:52 PMDavid Herman
04/16/2023, 6:52 PMDavid Herman
04/16/2023, 6:53 PMDavid Herman
04/16/2023, 6:54 PMDavid Herman
04/16/2023, 6:55 PMDavid Herman
04/16/2023, 6:55 PMDavid Herman
04/16/2023, 6:56 PMDavid Herman
04/16/2023, 6:57 PMFilip Wiesner
04/16/2023, 6:58 PMFilip Wiesner
04/16/2023, 6:58 PMFilip Wiesner
04/16/2023, 7:00 PMDavid Herman
04/16/2023, 7:02 PMBut the global style order feature sounds cool!
Maybe! But this is an easy way to get yourself in trouble in larger codebases
David Herman
04/16/2023, 7:02 PMFilip Wiesner
04/16/2023, 7:06 PMextraModifiers
and that also does not work. I guess I have to use the style in base {}
directlyFilip Wiesner
04/16/2023, 7:07 PMFilip Wiesner
04/16/2023, 7:09 PMI guess I have to use the style inAh, but I cannot use thedirectlybase {}
toModifier()
inside ComponentModifiers
block 😕David Herman
04/16/2023, 7:15 PMDavid Herman
04/16/2023, 7:16 PMDavid Herman
04/16/2023, 7:17 PMDavid Herman
04/16/2023, 7:22 PMFilip Wiesner
04/16/2023, 7:36 PMFilip Wiesner
04/16/2023, 7:36 PMDavid Herman
04/16/2023, 7:36 PMDavid Herman
04/16/2023, 7:37 PMFilip Wiesner
04/16/2023, 7:38 PMDavid Herman
04/16/2023, 7:39 PMFilip Wiesner
04/16/2023, 7:45 PMval TextFieldStyle by ComponentStyle(extraModifiers = { TypographyTitleMedium.toModifier() }) { ... }
â—¦ this has default size of this text field defined using TypographyTitleMedium
component
• val TypographyTitleMedium by ComponentStyle.base { ... }
â—¦ used in the text field by default
• val TypographyHeadlineSmall by ComponentStyle.base { ... }
â—¦ used in a modifier when calling TextField
component
The problem: The TypographyTitleMedium
is defined after TypographyHeadlineSmall
so I cannot override the default TextField typography CSS class and I don't want to redefine the Typography component in the text field file.David Herman
04/16/2023, 7:53 PMDavid Herman
04/16/2023, 7:55 PMDavid Herman
04/16/2023, 7:56 PMDavid Herman
04/16/2023, 7:56 PMFilip Wiesner
04/16/2023, 7:57 PMextraModifiers
but with 2 variants and the text field would have default variant (base would never be used)?
But using raw modifier instead of component style for the typography is good ideaDavid Herman
04/16/2023, 7:58 PMDavid Herman
04/16/2023, 7:58 PMDavid Herman
04/16/2023, 7:59 PMFilip Wiesner
04/16/2023, 8:01 PMFilip Wiesner
04/16/2023, 8:03 PMDavid Herman
04/16/2023, 8:39 PMDavid Herman
04/16/2023, 8:40 PM