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

could toHTML handle !important on height and width? #412

Open
MilesMcBain opened this issue Jul 8, 2021 · 1 comment
Open

could toHTML handle !important on height and width? #412

MilesMcBain opened this issue Jul 8, 2021 · 1 comment

Comments

@MilesMcBain
Copy link

MilesMcBain commented Jul 8, 2021

At the moment we can't instantiate a htmlwidget with inline CSS for height and width that uses the !important override. This will fail in htmltools::validateCssUnit.

This would come in handy to override framework assumptions about how to size our widgets. An example of this is {flexdashboard} which imposes height = 100% !important rstudio/flexdashboard#351. This has created a problem for me with a htmlwidget that is a set of controls, not a visualisation.

{flexdashboard} should probably not be doing this, but allowing !important to be used on the widget's inline CSS would allow us to easily skirt this issue wherever it occurs.

@cpsievert
Copy link
Collaborator

That makes sense that htmltools::validateCssUnit() should be able to handle !important. I filed an issue here rstudio/htmltools#328

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