-
Notifications
You must be signed in to change notification settings - Fork 113
Closed
Description
Currently, ui.fill.as_fillable_container()
and ui.fill.as_fill_item()
prepend the fill/fillable classes to the modified element's class list.
from shiny import ui
from htmltools import div
ui.fill.as_fill_item(div(class_="my-item"))
#> <div class="html-fill-item my-item"></div>
ui.fill.as_fillable_container(div(class_="my-container"))
#> <div class="html-fill-container my-container"></div>
As utility classes, these classes should be appended rather the prepended. In CSS the final styles are not impacted by the order of the classes in the class attribute. So this recommendation is a stylistic decision but important for debugging -- most often the first classes carry the most signal, e.g. bslib-grid
or bslib-sidebar-layout
, and it's much easier to debug markup in the browser when they appear first in the classlist.
from shiny import ui
from htmltools import div
ui.fill.as_fill_item(div(class_="my-item"))
#> <div class="my-item html-fill-item"></div>
ui.fill.as_fillable_container(div(class_="my-container"))
#> <div class="my-container html-fill-container"></div>
Metadata
Metadata
Assignees
Labels
No labels