-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Description
Tag classes are way too freeform and this makes it difficult to work with them. For example:
x <- div(class = "a", class = "b c", class = c("d", "e f"))
str(x)
#> List of 3
#> $ name : chr "div"
#> $ attribs :List of 3
#> ..$ class: chr "a"
#> ..$ class: chr "b c"
#> ..$ class: chr [1:2] "d" "e f"
#> $ children: list()
#> - attr(*, "class")= chr "shiny.tag"It would be better if this were translated to a data structure like c("a", "b", "c", "d", "e", "f") or "a b c d e f" when the tag is created.
Edit: I've realized that class isn't special; it makes sense to do this with all HTML attributes. We'll have to be careful about types, though (attributes can be atomic vectors, but they can also be lists or tag objects).
We should also make tagAppendAttribute and friends do the same thing.
Metadata
Metadata
Assignees
Labels
No labels