-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
4.1.2 breaks alignment of inline SVG icons #26878
Comments
Ah, yes, the selector is too strong and overrides classes. |
Removing svg {
vertical-align: middle;
} Because, svg:not(:root) {
overflow: hidden;
} is for IE9, so we can remove it. And... svg:not(:root) {
vertical-align: middle;
} SVG can be the root element, but I'm not sure you need |
Yup, I agree with that. Feel free to open a PR @ysds, or I can later this week. Hoping to do a 4.1.3 next week to fix some issues. |
@mdo sure. Which is preferred? img {
vertical-align: middle;
border-style: none; // Remove the border on images inside links in IE 10-.
}
svg {
vertical-align: middle;
} or img, svg {
vertical-align: middle;
}
img {
border-style: none; // Remove the border on images inside links in IE 10-.
} |
I would say option 1? |
I found @XhmikosR 's comment #26296 (comment) and https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7226597/. Unfortunately, that bug still exists in IE11. I don't have a environment to test with IE10. |
It is not only for IE9, it is necessary for all IE versions. |
@Herst Looks like it :) |
Is there any reason why we add
This demo works in IE10 and IE11: https://codepen.io/MartijnCuppens/pen/QBGoKd?editors=1100 |
Yeah, I have the same doubt. I can not imagine the scenario where Bootstrap is used in SVG documents. like: <svg xmlns="http://www.w3.org/2000/svg">
<style>
@import url(bootstrap.css);
</style>
<rect .../>
</svg> ref: https://www.w3.org/TR/SVG2/styling.html#LinkElement or <svg xmlns="http://www.w3.org/2000/svg">
<style>
/*!
* Bootstrap v4.1.2 (https://getbootstrap.com/)
...*/
</style>
<rect .../>
</svg> @mdo Do you expect any usage that Bootstrap is used in SVG documents? If not, the |
Definitely don't expect that usage :). |
@mdo thanks :) I’m going to update my PR. |
* `svg:not(:root)` specificity is very high (necolas/normalize.css#718) * Bootstrap do not support SVG documents (See twbs#26878)
* `svg:not(:root)` specificity is very high (necolas/normalize.css#718) * Bootstrap do not support SVG documents (See #26878)
A new change in 4.1.2 causes inline SVG icons to become unaligned.
The code in question,
/scss/_reboot.scss
, line 277:The issue can be seen in the following examples:
Version 4.1.1 (Icons aligned)
Version 4.1.2 (Icons not aligned)
The text was updated successfully, but these errors were encountered: