Christiano
05/15/2026, 11:19 AMCssStyle is not being set (the same for a TextInput)
In the image you can see that the Safari (left) is not using the proper styling while on the right Brave/Chrome is using it correctly. Also the @scope is properly shown... I'm at this for a couple of hours and can't seem to find what the issue is and why this only happens on an Input (with style text) or a TextArea... Can someone point me in the right direction or tell me what is actually happening?
A code snippet which causes it is the following...
val TextAreaStyle = CssStyle<TextAreaKind> {
base {
Modifier
.appearance(Appearance.None) // Disable browser styles - critical for Safari
.backgroundColor(Colors.Transparent)
.outline(0.px, LineStyle.Solid, Colors.Transparent) // Disable default outline
.border(0.px, LineStyle.Solid, Colors.Transparent) // Reset default border
}
}
sealed interface TextAreaKind : ComponentKind
@Composable
fun DsEditableArea(
modifier: Modifier = Modifier,
id: String,
label: String,
placeholder: String,
value: String,
required: Boolean = InputDefaults.Required,
onValueChange: (String) -> Unit
) {
Column(
modifier = modifier
) {
Label(
attrs = Modifier
.margin(bottom = 0.5.cssRem)
.toAttrs(),
forId = id
) {
Text(value = label)
}
TextArea(
value = value,
attrs = TextAreaStyle
.toModifier()
.toAttrs {
attr(Attributes.Name, "Message")
if (required) required()
placeholder(placeholder)
onInput { onValueChange(it.value) }
}
)
}
}
Edit: on the Checkbox it correctly sets the style and also shows up in the inspect toolChristiano
05/15/2026, 11:23 AMMeet just above my message has it as well so I feel like this is an internal kobweb issue? ๐ค
https://codingmeet.com/contact_meS.
05/15/2026, 11:31 AM.styleModifier { property("appearance", "none") } instead of kobweb's overloadS.
05/15/2026, 11:32 AMBorderFocusColor which only shows when the textfield has focusChristiano
05/15/2026, 11:34 AMstyleModifier like this does get set... but doesn't it defeat the purpose of the CssStyle a little bit? ๐คS.
05/15/2026, 11:35 AMS.
05/15/2026, 11:37 AMChristiano
05/15/2026, 11:40 AMstyleModifier you mention is giving some solace, but only if I duplicate everything from the CssStyle into the styleModifier as well... which kinda feels wrong ๐
S.
05/15/2026, 11:41 AMModifier.appearance(Appearance.None) with the styleModifier aboveChristiano
05/15/2026, 11:44 AMval TextAreaStyle = CssStyle<TextAreaKind> {
base {
Modifier
.styleModifier { property("appearance", "none") }
.backgroundColor(Colors.Transparent)
.outline(0.px, LineStyle.Solid, Colors.Transparent) // Disable default outline
.border(0.px, LineStyle.Solid, Colors.Transparent) // Reset default border
}
}
Sadly this does nothing at all as well, since this style is not even being set on the input element ๐S.
05/15/2026, 11:46 AMChristiano
05/15/2026, 11:50 AMDavid Herman
05/15/2026, 5:35 PMDavid Herman
05/15/2026, 5:39 PMModifier.appearance(Appearance.None) and .styleModifier { property("appearance", "none") } are identical, except the Kobweb version has type safety.
Modifier:
https://github.com/varabyte/kobweb/blob/174e2597e6c6f12ffa8c3fc44cf5f2b8d42c0d96/frontend/kobweb-compose/src/jsMain/kotlin/com/varabyte/kobweb/compose/ui/modifiers/ElementModifiers.kt#L9
Style property that modifier delegates to:
https://github.com/varabyte/kobweb/blob/174e2597e6c6f12ffa8c3fc44cf5f2b8d42c0d96/frontend/compose-html-ext/src/jsMain/kotlin/com/varabyte/kobweb/compose/css/Element.kt#L20
Test verifying style property:
https://github.com/varabyte/kobweb/blob/174e2597e6c6f12ffa8c3fc44cf5f2b8d42c0d96/frontend/compose-html-ext/src/jsTest/kotlin/com/varabyte/kobweb/compose/css/CssStylePropertyTests.kt#L226David Herman
05/15/2026, 5:50 PMS.
05/15/2026, 5:56 PMDavid Herman
05/15/2026, 6:35 PM.styleModifier { property("appearance", "none") } to appearance(Appearance.None) it will be identical behavior. If that's not the case, I'd love to hear it.S.
05/15/2026, 6:39 PMS.
05/15/2026, 6:41 PMDavid Herman
05/15/2026, 6:45 PMDavid Herman
05/15/2026, 6:46 PMDavid Herman
05/15/2026, 6:46 PMLetter
05/15/2026, 7:04 PMS.
05/15/2026, 7:07 PMDavid Herman
05/15/2026, 7:15 PMS.
05/15/2026, 7:16 PMDavid Herman
05/15/2026, 7:16 PMDavid Herman
05/15/2026, 7:17 PMDavid Herman
05/15/2026, 8:09 PMChristiano
05/16/2026, 8:50 AM