Extract mixin to add a gap to a flexbox layout

This way we remove duplication and it'll be easier to add better support
for RTL languages.

In a few years this might not be necessary since support for the `gap`
property in a flexbox layout will improve. At the time of writing,
however, only 86.5% of the browsers support it [1].

[1] https://caniuse.com/flexbox-gap
This commit is contained in:
Javi Martín
2021-08-21 23:18:51 +02:00
parent 4a42804a7d
commit 4fea839c54
9 changed files with 18 additions and 41 deletions

View File

@@ -2,14 +2,8 @@
margin-bottom: $line-height / 2;
@include breakpoint(medium) {
$gap: 1em;
@include flex-with-gap(1em);
align-items: flex-end;
display: flex;
margin-left: -$gap;
> * {
margin-left: $gap;
}
}
select {