scalatags
scalatags copied to clipboard
Attribute selectors supported?
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.
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
)
)
}
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