mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-04 04:29:23 +01:00
CSS: consistent approach for calc
with negative values (#41004)
Co-authored-by: Louis-Maxime Piton <louismaxime.piton@orange.com> Co-authored-by: Julien Déramond <juderamond@gmail.com>
This commit is contained in:
parent
b3d2e7b1d8
commit
c536836aa8
@ -39,7 +39,7 @@
|
|||||||
// Prevent double borders when buttons are next to each other
|
// Prevent double borders when buttons are next to each other
|
||||||
> :not(.btn-check:first-child) + .btn,
|
> :not(.btn-check:first-child) + .btn,
|
||||||
> .btn-group:not(:first-child) {
|
> .btn-group:not(:first-child) {
|
||||||
margin-left: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
|
margin-left: calc(-1 * #{$btn-border-width}); // stylelint-disable-line function-disallowed-list
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset rounded corners
|
// Reset rounded corners
|
||||||
@ -126,7 +126,7 @@
|
|||||||
|
|
||||||
> .btn:not(:first-child),
|
> .btn:not(:first-child),
|
||||||
> .btn-group:not(:first-child) {
|
> .btn-group:not(:first-child) {
|
||||||
margin-top: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
|
margin-top: calc(-1 * #{$btn-border-width}); // stylelint-disable-line function-disallowed-list
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset rounded corners
|
// Reset rounded corners
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
margin-left: $pagination-margin-start;
|
margin-left: $pagination-margin-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $pagination-margin-start == calc(#{$pagination-border-width} * -1) {
|
@if $pagination-margin-start == calc(-1 * #{$pagination-border-width}) {
|
||||||
&:first-child {
|
&:first-child {
|
||||||
.page-link {
|
.page-link {
|
||||||
@include border-start-radius(var(--#{$prefix}pagination-border-radius));
|
@include border-start-radius(var(--#{$prefix}pagination-border-radius));
|
||||||
|
@ -1302,7 +1302,7 @@ $pagination-color: var(--#{$prefix}link-color) !default;
|
|||||||
$pagination-bg: var(--#{$prefix}body-bg) !default;
|
$pagination-bg: var(--#{$prefix}body-bg) !default;
|
||||||
$pagination-border-radius: var(--#{$prefix}border-radius) !default;
|
$pagination-border-radius: var(--#{$prefix}border-radius) !default;
|
||||||
$pagination-border-width: var(--#{$prefix}border-width) !default;
|
$pagination-border-width: var(--#{$prefix}border-width) !default;
|
||||||
$pagination-margin-start: calc(#{$pagination-border-width} * -1) !default; // stylelint-disable-line function-disallowed-list
|
$pagination-margin-start: calc(-1 * #{$pagination-border-width}) !default; // stylelint-disable-line function-disallowed-list
|
||||||
$pagination-border-color: var(--#{$prefix}border-color) !default;
|
$pagination-border-color: var(--#{$prefix}border-color) !default;
|
||||||
|
|
||||||
$pagination-focus-color: var(--#{$prefix}link-hover-color) !default;
|
$pagination-focus-color: var(--#{$prefix}link-hover-color) !default;
|
||||||
|
@ -121,7 +121,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
> :not(:first-child):not(.dropdown-menu)#{$validation-messages} {
|
> :not(:first-child):not(.dropdown-menu)#{$validation-messages} {
|
||||||
margin-left: calc(#{$input-border-width} * -1); // stylelint-disable-line function-disallowed-list
|
margin-left: calc(-1 * #{$input-border-width}); // stylelint-disable-line function-disallowed-list
|
||||||
@include border-start-radius(0);
|
@include border-start-radius(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,13 +93,13 @@
|
|||||||
.fixed-top,
|
.fixed-top,
|
||||||
.sticky-top {
|
.sticky-top {
|
||||||
position: static;
|
position: static;
|
||||||
margin: calc(var(--bd-example-padding) * -1) calc(var(--bd-example-padding) * -1) var(--bd-example-padding); // stylelint-disable-line function-disallowed-list
|
margin: calc(-1 * var(--bd-example-padding)) calc(-1 * var(--bd-example-padding)) var(--bd-example-padding); // stylelint-disable-line function-disallowed-list
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-bottom,
|
.fixed-bottom,
|
||||||
.sticky-bottom {
|
.sticky-bottom {
|
||||||
position: static;
|
position: static;
|
||||||
margin: var(--bd-example-padding) calc(var(--bd-example-padding) * -1) calc(var(--bd-example-padding) * -1); // stylelint-disable-line function-disallowed-list
|
margin: var(--bd-example-padding) calc(-1 * var(--bd-example-padding)) calc(-1 * var(--bd-example-padding)); // stylelint-disable-line function-disallowed-list
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user