These are chat archives for japgolly/scalacss

5th
May 2016
Raúl Piaggio
@rpiaggio
May 05 2016 15:02
how do I define a transform property?
transform("translateX(-50%)") doesn't compile
transform := "translateX(-50%)" seems to work
Ari Lacenski
@tensory
May 05 2016 18:55
Does anyone have any suggestions for expressing fontSize?
Ari Lacenski
@tensory
May 05 2016 19:02
my error:
Users/ari/workspace/examples/csstests/scalatags-css/app/views/ScalaCssViews.scala:28: type mismatch;
[error]  found   : Int(12)
[error]  required: ?{def px: ?}
[error] Note that implicit conversions are not applicable because they are ambiguous:
[error]  both method Int2CssNumber in trait DataConverters of type (x: Int)scalatags.Text.all.CssNumber[Int]
[error]  and method autoDslNumI in class DslBase of type (a: Int)scalacss.DslBase.DslNum[Int]
[error]  are possible conversion functions from Int(12) to ?{def px: ?}
[error]         fontSize(12 px),
Kevin Walter
@lucidd
May 05 2016 19:05
something like fontSize(14.px) should work.
Ari Lacenski
@tensory
May 05 2016 19:06
thanks for the reply, @lucidd! I get the same error with the dot added.
it looks like @ayushmishra2005 is including ext-scalatags as well as core from the scalacss dependency... Going to try that.
While I'm looking at my build.sbt (I'm pretty new to Play)... it's slightly offtopic, but what is the difference between "com.github.japgolly.scalacss" %% "core" % "0.4.0" and the three-% version with "com.github.japgolly.scalacss" %%% "core" % "0.4.0"?
Ari Lacenski
@tensory
May 05 2016 19:12
It's not working any better with ext-scalatags added, sadly.
Kevin Walter
@lucidd
May 05 2016 19:12
the %%% is for scalajs and does some magic to resolve the right jar
do you have both scalacss and scalatags imported in the same scope?
Ari Lacenski
@tensory
May 05 2016 19:14
yep, in the same grouping:
  "com.lihaoyi" %% "scalatags" % "0.5.5",

  "com.github.japgolly.scalacss" %% "ext-scalatags" % "0.4.0",
  "com.github.japgolly.scalacss" %% "core" % "0.4.0"
Kevin Walter
@lucidd
May 05 2016 19:15
sorry i meant imported in the file ScalaCssViews
it could be that there are some ambiguous implicits because of that
Ari Lacenski
@tensory
May 05 2016 19:18
oh, yes I do, and px might possibly be defined in scalatags...
Kevin Walter
@lucidd
May 05 2016 19:19
yeah i think thats the problem i just tried it with import scalacss.Defaults._ import scalatags.DataConverters._
and i get the same error
try to put your styles into their own file and only import scalacss and whatever else you need for your styles