Hi everyone, I'm trying to use the `&& { }...
# javascript
f
Hi everyone, I'm trying to use the
&& { }
notation to override the default styles in the MaterialUI library using the
kotlin-styled
library but I can't find how to do that. I assume there must be a method inside
CssBuilder
that does this but I can't find it. Does anyone know what is the same of the method?
m
Maybe
Copy code
"&&" {
   // …
}
f
Thanks @Marc Knaup that seemed to work 🙂, I was not aware of the
String.invoke()
extension function inside
CssBuilder
which allows for this and I assumed there would be a more clear function to do this like the
children()
or
descendants()
one.
m
I think you mean
specific { … }
and
specific(n) { … }
It doesn’t use
&&
though but class names directly.
f
Oh yup,
specific()
is the one. Can you show me an example of how you use class names directly to override other styles @Marc Knaup?
m
Nevermind I must have read that wrong at late night 😄
specific()
actually does use
&&…
.
f
No worries, thanks for the help 🙂