These are chat archives for japgolly/scalacss

24th
May 2016
Phuoc Nguyen
@nghuuphuoc
May 24 2016 08:29
In usual LESS/SCSS, we often have a variable like $basePadding: 20px. In ScalaCSS, I have to pass padding(20 px) or padding(20.px).
How I can pass a pre-defined string, such as "20px" to these usages?
Phuoc Nguyen
@nghuuphuoc
May 24 2016 10:05
Got it.
object Variables extends StyleSheet.Inline {
  import dsl._ // scalastyle:ignore

  val baseBorderRadius = 3 px
  val basePadding = 20 px

  val greyLight80 = c"#dadfe3"
  val greyLight100 = c"#f2f4f5"

  val successColor = c"#85b257"
  val successColorLight80 = c"#d6e5c7"
  val successColorLight100 = c"#ebf2e3"
}
Another question:
val linkButton = style(
    cursor.pointer,
    textDecorationLine.none,

    &.hover(
      textDecorationLine.none
    )
  )
the textDecorationLine.none generates text-decoration-line: none; which isn't correct and expected property. What I want here is text-decoration: none
text-decoration-line isn't supported by Chrome as mentioned at https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-line
So, the question is: How I can generate text-decoration: none?
Phuoc Nguyen
@nghuuphuoc
May 24 2016 10:18
I am using v0.4.1
Phuoc Nguyen
@nghuuphuoc
May 24 2016 10:24
Workaround: textDecoration := ^.none
Bhagyashree-B
@Bhagyashree-B
May 24 2016 11:31

Hi all, I am trying to use the standalone css version as <.styleTag(standaloneCSS.render) in the render method of my component. however it returns the following errors

ambiguous implicit values:
 both method cssReactElementRenderer in trait ScalaCssReactImplicits of type (implicit s: scalacss.Renderer[String])scalacss.Renderer[japgolly.scalajs.react.ReactElement]
 and method stringRenderer in trait Defaults of type => scalacss.Renderer[String]
 match expected type scalacss.Renderer[Out]

Not sure what am I doing wrong?