Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags2 #50

Closed
mathieuleclaire opened this issue Nov 4, 2014 · 1 comment
Closed

Tags2 #50

mathieuleclaire opened this issue Nov 4, 2014 · 1 comment

Comments

@mathieuleclaire
Copy link
Collaborator

Hi,
for some reason, the tags from Tags2 does not seem to work properly. For instance the ":=" method does not work fine. The following code in js-fiddle does not work for the nav tag (but works for "p" and "label"):

import scalatags.JsDom.all._    
import scalatags.Text.tags2._

object ScalaJSExample extends js.JSApp{
  def main() = {
  println(p(color := "red")("Red Text"))
  println(label(color := "green")("Green Label"))
  println(nav(color := "red"))
  }
}

produces the error:

Main.scala:20: error: type mismatch;
 found   : scalatags.generic.StylePair[org.scalajs.dom.Element,String]
 required: scalatags.Text.Modifier
    (which expands to)  scalatags.generic.Modifier[scalatags.text.Builder]
  println(nav(color := "red"))
                    ^
@lihaoyi
Copy link
Member

lihaoyi commented Nov 5, 2014

You can't use Text.tags2 together with JsDom.all; you want JsDom.tags2

Also, please use the mailing list https://groups.google.com/forum/#!forum/scalatags instead of putting these in the issue tracker ^_^

@lihaoyi lihaoyi closed this as completed Nov 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants