andrew
04/28/2026, 5:04 AMStylianos Gakis
04/28/2026, 1:53 PMandrew
04/28/2026, 2:00 PMandrew
04/28/2026, 2:29 PMStylianos Gakis
04/28/2026, 3:23 PMandrew
04/28/2026, 3:28 PMChuck Jazdzewski [G]
04/28/2026, 6:33 PMstyleable() modifier.
However, we will make these values like contentColor available but the mechanism and API is still TBD.andrew
04/28/2026, 6:34 PMandrew
04/28/2026, 6:34 PMandrew
04/29/2026, 3:08 PMBox(Modifier.styleable(null, { contentColor(Color.Black) })) {
Component()
}
@Composable
fun Component() {
Box(Modifier.styleable(null, { borderColor(/* FETCH CURRENT CONTENT COLOR */) })) {}
}Chuck Jazdzewski [G]
04/29/2026, 3:14 PMandrew
04/29/2026, 3:16 PMandrew
04/29/2026, 3:17 PMChuck Jazdzewski [G]
04/29/2026, 3:30 PMcontentColor out of the style properties and let you set "inherited" properties though the modifier local (or similar, details TBD). This would then allow you to set the contentColor in a custom property and then use the style to map these properties into the style properties using a style. This would allow reading the property as you specified here these values would be readable in a style.
The reason to avoid reading properties is that it turns some of the properties into magic properties that may have surprising effects. For example, assuming the style was { borderColor(contentColor) }, what would it mean to change contentColor after this style is applied? Would you expect the above to match the resolved value or the value at the time it was executed? In other words, what is the borderColor for,
{
contentColor(Color.Green)
borderColor(contentColor)
contentColor(Color.Red)
}
It seems obvious here that the color is Color.Green but less obvious if the first two are in a different style (say the base style for a component) and the last is an override such as,
Button(..., style = { contentColor(Color.Red) }) { ... }
Whoudl the border color be Green or Red?
I want the style properties to have a very specific, well-defined meaning. Meta properties, like contentColor should be defined by the theming system which moving this out of the style properties allows.andrew
04/29/2026, 3:33 PM