File tree Expand file tree Collapse file tree 3 files changed +8
-22
lines changed
Expand file tree Collapse file tree 3 files changed +8
-22
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @cloudfour/patterns ' : patch
3+ ---
4+
5+ Button Group and Inline Lists now use ` gap ` properties instead of margin, removing the need for negative margins on the parent element
Original file line number Diff line number Diff line change 77/// changing to Flexbox Gap once browser support is better in the future).
88
99.o-button-group {
10- --gap : #{size .$spacing-gap-button-group-default } ;
11-
1210 display : flex ;
1311 flex-wrap : wrap ;
14- margin : calc (var (--gap ) / -2 ); /* 1 */
15-
16- > * {
17- margin : calc (var (--gap ) / 2 ); /* 1 */
18- }
12+ gap : size .$spacing-gap-button-group-default ;
1913}
2014
2115///
Original file line number Diff line number Diff line change 1616}
1717
1818/// Modifier: Inline
19- ///
20- /// By default, this uses negative margins on the sides to account for extra
21- /// margin between child elements. This allows child elements to reach the edges
22- /// of their parent while maintaining consistent gaps between.
23- ///
24- /// This would be a _lot_ more elegant if it used the Flexbox-compatible `gap`
25- /// property. But unfortunately there is no way to test for that without false
26- /// positives as of this writing.
27- ///
28- /// @link https://medium.com/@schofeld/mind-the-flex-gap-c9cd1b4b35d8
29- /// @link https://github.com/w3c/csswg-drafts/issues/3559
3019
3120.o-list--inline {
21+ column-gap : size .$spacing-list-inline-gap ;
3222 display : flex ;
3323 flex-wrap : wrap ;
34- margin-inline : math .div (size .$spacing-list-inline-gap , -2 );
3524}
3625
37- .o-list--inline > * {
38- margin-inline : math .div (size .$spacing-list-inline-gap , 2 );
39- }
26+ /// Modifier: Columns
4027
4128@for $i from 2 through 3 {
4229 .o-list--#{$i } -column {
You can’t perform that action at this time.
0 commit comments