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

Attribute selectors supported? #151

Open
chipsenkbeil opened this issue Jan 2, 2017 · 2 comments
Open

Attribute selectors supported? #151

chipsenkbeil opened this issue Jan 2, 2017 · 2 comments

Comments

@chipsenkbeil
Copy link

I want to be able to write something like

.myClass input[type="radio"] {
  /* ... */
}

There doesn't appear to be any documentation for attribute selectors nor do I see anything for them in the source code.

@chipsenkbeil
Copy link
Author

Looks like I can do the following for now:

object MyStyle extends CascadingStyleSheet {
  lazy val myClass: Cls = cls(
    Selector("input[type='radio']")(
      // My specific CSS content
    )
  )
}

@lihaoyi
Copy link
Member

lihaoyi commented Jan 3, 2017

lol I didn't even realize you could do that.

I guess we could document it, or maybe even include it as part of the base-syntax if we could find a nice way of representing. Maybe input(type := "radio") or something. This might clash with the existing use of input.apply to mean building up a frag, so it might take some refactoring to separate the inputs we see in CascadingStyleSheet from the inputs we see in scalatags.Text.all._ so we can make that syntax work

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