mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-23 09:41:11 +00:00
Allow .page-links to get left margin. (#28948)
* Allow .page-links to get left margin. * Add border-radius to page-links in case they have left margin * Apply MartijnCuppens suggestion to _pagination.scss Co-Authored-By: Martijn Cuppens <martijn.cuppens@gmail.com> * Plus if/else Rules * Formatting fixes * Fix border-radius for pagination-size * Use mixin for default pagination sizing
This commit is contained in:
parent
81af1bf9cc
commit
4ae6a29b12
@ -6,9 +6,6 @@
|
|||||||
.page-link {
|
.page-link {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
padding: $pagination-padding-y $pagination-padding-x;
|
|
||||||
margin-left: -$pagination-border-width;
|
|
||||||
line-height: $pagination-line-height;
|
|
||||||
color: $pagination-color;
|
color: $pagination-color;
|
||||||
background-color: $pagination-bg;
|
background-color: $pagination-bg;
|
||||||
border: $pagination-border-width solid $pagination-border-color;
|
border: $pagination-border-width solid $pagination-border-color;
|
||||||
@ -29,16 +26,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.page-item {
|
.page-item {
|
||||||
&:first-child {
|
&:not(:first-child) .page-link {
|
||||||
.page-link {
|
margin-left: $pagination-margin-left;
|
||||||
margin-left: 0;
|
|
||||||
@include border-left-radius($border-radius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:last-child {
|
|
||||||
.page-link {
|
|
||||||
@include border-right-radius($border-radius);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active .page-link {
|
&.active .page-link {
|
||||||
@ -62,6 +51,7 @@
|
|||||||
//
|
//
|
||||||
// Sizing
|
// Sizing
|
||||||
//
|
//
|
||||||
|
@include pagination-size($pagination-padding-y, $pagination-padding-x, null, $pagination-line-height, $pagination-border-radius);
|
||||||
|
|
||||||
.pagination-lg {
|
.pagination-lg {
|
||||||
@include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $border-radius-lg);
|
@include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $border-radius-lg);
|
||||||
|
@ -809,6 +809,8 @@ $pagination-line-height: 1.25 !default;
|
|||||||
$pagination-color: $link-color !default;
|
$pagination-color: $link-color !default;
|
||||||
$pagination-bg: $white !default;
|
$pagination-bg: $white !default;
|
||||||
$pagination-border-width: $border-width !default;
|
$pagination-border-width: $border-width !default;
|
||||||
|
$pagination-border-radius: $border-radius !default;
|
||||||
|
$pagination-margin-left: -$pagination-border-width !default;
|
||||||
$pagination-border-color: $gray-300 !default;
|
$pagination-border-color: $gray-300 !default;
|
||||||
|
|
||||||
$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default;
|
$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default;
|
||||||
|
@ -8,14 +8,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.page-item {
|
.page-item {
|
||||||
&:first-child {
|
@if $pagination-margin-left == (-$pagination-border-width) {
|
||||||
.page-link {
|
&:first-child {
|
||||||
@include border-left-radius($border-radius);
|
.page-link {
|
||||||
|
@include border-left-radius($border-radius);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
|
.page-link {
|
||||||
|
@include border-right-radius($border-radius);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} @else {
|
||||||
|
//Add border-radius to all pageLinks in case they have left margin
|
||||||
.page-link {
|
.page-link {
|
||||||
@include border-right-radius($border-radius);
|
@include border-radius($border-radius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user