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
We'd need to detect when .bp3-button-text is :empty in order to remove the margin-right from the precedingsvg element, and
CSS selectors don't let you peek ahead like that,
It follows that:
A pure CSS solution here would presumably require us to either (1) add a new bp3-button-empty CSS class to the root button element, or (2) move the margin-right on the svg to a margin-left on bp3-button-text, then do this:
.bp3-icon + .bp3-button-text {
margin: 7px; // or whatever SCSS variable math yields this value
}
.bp3-button-text:empty {
margin-left: 0;
}
I propose (2).
The text was updated successfully, but these errors were encountered:
Environment
@blueprintjs/core 3.2.0
Steps to reproduce
Buttons with an icon but no text have extra right padding in Blueprint 3.X (and maybe in 2.X too, since that's when the SVG icon refactor occurred?).
Actual behavior
From the Button docs:
Expected behavior
Possible solution
Given that:
.bp3-button-text
is:empty
in order to remove themargin-right
from the precedingsvg
element, andIt follows that:
A pure CSS solution here would presumably require us to either (1) add a new
bp3-button-empty
CSS class to the root button element, or (2) move themargin-right
on thesvg
to amargin-left
onbp3-button-text
, then do this:I propose (2).
The text was updated successfully, but these errors were encountered: