-
Notifications
You must be signed in to change notification settings - Fork 441
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
Margin and padding shim for bootstrap 5 migration #13625
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
@each $breakpoint in map-keys($grid-breakpoints) { | ||
@include media-breakpoint-up($breakpoint) { | ||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
@each $prop, $abbrev in (margin: m, padding: p) { | ||
@each $size, $length in $spacers { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As a reference, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With bootstrap 5, those will have to be updated to 861f819, but that's not needed here |
||
.#{$abbrev}e#{$infix}-#{$size} { | ||
#{$prop}-right: $length !important; | ||
} | ||
.#{$abbrev}s#{$infix}-#{$size} { | ||
#{$prop}-left: $length !important; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
.badge { | ||
@each $color, $value in $theme-colors { | ||
&.bg-#{$color} { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ | |
|
||
i { | ||
line-height: 1.5; | ||
@extend .mr-1; | ||
@extend .me-1; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ $request-obsolete-color: $dark; | |
|
||
.legend { | ||
ul { | ||
@extend .ml-2; | ||
@extend .ms-2; | ||
|
||
li { | ||
span { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,6 @@ | |
font-size: 40%; | ||
} | ||
|
||
.ml-0_6 { | ||
.ms-0_6 { | ||
margin-left: 0.6rem !important; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
= link_to(my_notifications_path(@filter_item), class: "list-group-item list-group-item-action #{css_for_link}") do | ||
= @text | ||
- if @amount.positive? | ||
%span.badge.align-text-top.ml-2{ class: css_for_badge_color }>= @amount | ||
%span.badge.align-text-top.ms-2{ class: css_for_badge_color }>= @amount |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
= link_to(token_workflow_runs_path(@token, @filter_item), class: "list-group-item list-group-item-action #{css_for_link}") do | ||
= @text | ||
- if @amount.positive? | ||
%span.badge.align-text-top.ml-2{ class: css_for_badge_color }>= @amount | ||
%span.badge.align-text-top.ms-2{ class: css_for_badge_color }>= @amount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you come up with this Sass code? It looks like something from upstream which was slightly adapted. I'm asking to understand and also to compare with how Bootstrap does this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed I just copied over code from https://github.com/twbs/bootstrap/blob/v4-dev/scss/utilities/_spacing.scss and modified it to replace r and l to e and s