-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[WebProfilerBundle] Prevent toolbar links color override by css #27758
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
[WebProfilerBundle] Prevent toolbar links color override by css #27758
Conversation
@@ -53,6 +53,9 @@ | |||
-webkit-font-smoothing: subpixel-antialiased; | |||
-moz-osx-font-smoothing: auto; | |||
} | |||
div.sf-toolbar .sf-toolbarreset a { |
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.
Shouldn't you rather update the existing .sf-toolbar-block .sf-toolbar-info-piece a
selector?
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.
These changes seems to look fine in 3.4:
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig
index e3a0d8454f..5581e1303f 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig
+++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig
@@ -160,11 +160,11 @@
margin-bottom: 0;
}
-.sf-toolbar-block .sf-toolbar-info-piece a {
+div.sf-toolbar .sf-toolbar-block .sf-toolbar-info-piece a {
color: #99CDD8;
text-decoration: underline;
}
-.sf-toolbar-block .sf-toolbar-info-piece a:hover {
+div.sf-toolbar .sf-toolbar-block .sf-toolbar-info-piece a:hover {
text-decoration: none;
}
This rule:
symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig
Lines 90 to 94 in 6e5c15d
.sf-toolbar-block > a, | |
.sf-toolbar-block > a:hover { | |
display: block; | |
text-decoration: none; | |
} |
.sf-toolbar-block > a
(i.e the toolbar item itself, containing the icon) does not get an underline. Perhaps need to be enforced as well with div.sf-toolbar
to strengthen precedence over your own css.
We must also double-check other css rules using text-decoration: none
to ensure they keep precedence over the changed selectors.
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.
Ok I get your point, thank you.
It works on 2.8
94b0a3f
to
b3dadf6
Compare
b3dadf6
to
e12e217
Compare
Thank you @alcalyn. |
…y css (alcalyn) This PR was merged into the 2.8 branch. Discussion ---------- [WebProfilerBundle] Prevent toolbar links color override by css | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #27658 | License | MIT | Doc PR | Fixes this issue: #27658 (comment) Links color in toolbar can be easily override by application css. As this could happens sometimes, this PR set links color with a stronger CSS precedence. Commits ------- e12e217 Prevent toolbar links color override by css
Fixes this issue: #27658 (comment)
Links color in toolbar can be easily override by application css. As this could happens sometimes, this PR set links color with a stronger CSS precedence.