-
Notifications
You must be signed in to change notification settings - Fork 147
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
[Tidy] Remove redundant CSS and add updated bootstrap file #931
Conversation
@@ -1,37 +0,0 @@ | |||
@media (prefers-reduced-motion: reduce) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we've added this back then, because there was no bootstrap theme loaded by default, right? @nadijagraca All of this shouldn't be required anymore given that there is a bootstrap CSS file loaded now. I checked the example apps and it seems to work fine 👍 But could you double-check any apps for which you initially added this CSS in? Was it just for the collapse button? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to let you know that there is no longer a smooth collapsing transition when the control panel is collapsed/expanded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I noticed, but I didn't think it was that bad for it to need custom static CSS. I rather live with the default collapse behaviour from Bootstrap and have no static CSS 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maxschulz-COL @nadijagraca Do you have any thoughts on this? I think we should keep the collapse transition as done in the main branch, bug I'm okay to remove it if you agree.
View the example dashboards of the current commit live on PyCafe ☕ 🚀Updated on: 2024-12-17 09:38:06 UTC Link: vizro-core/examples/dev/ Link: vizro-core/examples/scratch_dev |
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐ 🧹
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great work! I love seeing all those selectors removed. 🧹 ✨ 🚀
font-size: 14px; | ||
/* Styling for pagination element */ | ||
#dashboard-container .first-page, | ||
#dashboard-container .previous-page, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming you are repeating #dashboard-container
for higher specificity? I'm just curious would we achieve the same result without the repetition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be fine without it. However, if you take a look at the console in the current scratch dev example, you'll see that one dash selector actually has a higher specificity. So if we remove the dashboard-container
id, the only reason this works is because the current dash selector does not have these properties defined. In this case, it's just safer to add it, so our selector always has higher specificity.
Description
collapse.css
(redundant since we load in the bootstrap theme now)table.css
(noticed a lot of complex selectors, I just simplified it)Card
from bootstrap-theme tostatic
foldertext-secondary
has changedtext-primaryHover
color for nav linksScreenshot
Notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":