You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Bootstrap v3.3.1 many of the font settings were properly reset for tooltip/popover content via 2862c30. I'm glad the decision was made in this direction, to reset font/text back to defaults within the content — but the implementation was incomplete. For example, we noticed already that a popover within font-style: italic text has its contents still italic. So #15046 does not seem fully resolved yet.
In case it's helpful, here's a LESS snippet (including a link that could lead you to a relevant reference) that I used for resetting fonts in a non-Bootstrap project:
.reset-text(@fontsize) { // used to avoid unwanted inheritance of text-related styles from a parent
// most of this list is based on properties first-line applies to [NOTE: hasn't been exhaustively reviewed]
// see https://developer.mozilla.org/en-US/docs/Web/CSS/::first-line (and W3C spec) for more details
font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;
font-size: @fontsize;
// font, font-family omitted
color: black;
word-spacing: normal; letter-spacing: normal; text-decoration: none; text-transform: none;
text-shadow: none;
// some other properties added in as well
text-indent: 0;
text-align: left; text-align: start;
}
Note that the snippet above is not exhaustive (it likely covers only the properties we used/anticipated in this particular app and/or predates more properties being added to the spec) but hopefully a more thorough start — not to mention perhaps the idea to encapsulate all the reset in a reusable LESS mixin is valuable.
The text was updated successfully, but these errors were encountered:
Would I be correct that this would essentially be set as a mixin on the .tooltip and .popover base classes to "default" the text, then overwrite them with our specific values?
Yes, although you may just wish to default to your own (Bootstrap defaults) in your version of the mixin, rather than trying to fully reset all the properties.
In Bootstrap v3.3.1 many of the font settings were properly reset for tooltip/popover content via 2862c30. I'm glad the decision was made in this direction, to reset font/text back to defaults within the content — but the implementation was incomplete. For example, we noticed already that a popover within
font-style: italic
text has its contents still italic. So #15046 does not seem fully resolved yet.In case it's helpful, here's a LESS snippet (including a link that could lead you to a relevant reference) that I used for resetting fonts in a non-Bootstrap project:
Note that the snippet above is not exhaustive (it likely covers only the properties we used/anticipated in this particular app and/or predates more properties being added to the spec) but hopefully a more thorough start — not to mention perhaps the idea to encapsulate all the reset in a reusable LESS mixin is valuable.
The text was updated successfully, but these errors were encountered: