1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-29 08:10:47 +02:00

Convert pagination component to CSS variables (#35399)

* Convert pagination component to CSS variables

* Use RFS mixin

* Remove the useless fallback
This commit is contained in:
Mark Otto
2022-02-16 10:26:24 -08:00
committed by GitHub
parent 2a09f10676
commit 48a7160cf4
3 changed files with 72 additions and 43 deletions

View File

@@ -2,30 +2,9 @@
// scss-docs-start pagination-mixin
@mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
.page-link {
padding: $padding-y $padding-x;
@include font-size($font-size);
}
.page-item {
@if $pagination-margin-start == (-$pagination-border-width) {
&:first-child {
.page-link {
@include border-start-radius($border-radius);
}
}
&:last-child {
.page-link {
@include border-end-radius($border-radius);
}
}
} @else {
//Add border-radius to all pageLinks in case they have left margin
.page-link {
@include border-radius($border-radius);
}
}
}
--#{$variable-prefix}pagination-padding-x: #{$padding-x};
--#{$variable-prefix}pagination-padding-y: #{$padding-y};
@include rfs($font-size, --#{$variable-prefix}pagination-font-size);
--#{$variable-prefix}pagination-border-radius: #{$border-radius}; // stylelint-disable-line custom-property-empty-line-before
}
// scss-docs-end pagination-mixin