These are chat archives for japgolly/scalacss

23rd
Aug 2016
Artsiom Miklushou
@mikla
Aug 23 2016 15:05

Hello,
how it’s possible to apply style for a element in runtime.
for example, I have element color that comes from the server,
and I’m trying to do somethin like this

 def elementColorStyle(color: DomainColor) = styleF(colorDomain(color)) { c =>
    styleS(backgroundColor(Color(c.cssHexString)))
  }

The first problem that I must have Domain[DomainColor] to use styleF
Second i’m getting warning Style being registered after stylesheet has been rendered