2022-03-25 05:14:42 +01:00
|
|
|
// stylelint-disable custom-property-empty-line-before
|
|
|
|
|
2014-12-02 23:02:35 +01:00
|
|
|
.pagination {
|
2022-02-16 19:26:24 +01:00
|
|
|
// scss-docs-start pagination-css-vars
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
--#{$prefix}pagination-padding-x: #{$pagination-padding-x};
|
|
|
|
--#{$prefix}pagination-padding-y: #{$pagination-padding-y};
|
2022-03-25 05:14:42 +01:00
|
|
|
@include rfs($pagination-font-size, --#{$prefix}pagination-font-size);
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
--#{$prefix}pagination-color: #{$pagination-color};
|
|
|
|
--#{$prefix}pagination-bg: #{$pagination-bg};
|
|
|
|
--#{$prefix}pagination-border-width: #{$pagination-border-width};
|
|
|
|
--#{$prefix}pagination-border-color: #{$pagination-border-color};
|
|
|
|
--#{$prefix}pagination-border-radius: #{$pagination-border-radius};
|
|
|
|
--#{$prefix}pagination-hover-color: #{$pagination-hover-color};
|
|
|
|
--#{$prefix}pagination-hover-bg: #{$pagination-hover-bg};
|
|
|
|
--#{$prefix}pagination-hover-border-color: #{$pagination-hover-border-color};
|
|
|
|
--#{$prefix}pagination-focus-color: #{$pagination-focus-color};
|
|
|
|
--#{$prefix}pagination-focus-bg: #{$pagination-focus-bg};
|
|
|
|
--#{$prefix}pagination-focus-box-shadow: #{$pagination-focus-box-shadow};
|
|
|
|
--#{$prefix}pagination-active-color: #{$pagination-active-color};
|
|
|
|
--#{$prefix}pagination-active-bg: #{$pagination-active-bg};
|
|
|
|
--#{$prefix}pagination-active-border-color: #{$pagination-active-border-color};
|
|
|
|
--#{$prefix}pagination-disabled-color: #{$pagination-disabled-color};
|
|
|
|
--#{$prefix}pagination-disabled-bg: #{$pagination-disabled-bg};
|
|
|
|
--#{$prefix}pagination-disabled-border-color: #{$pagination-disabled-border-color};
|
2022-02-16 19:26:24 +01:00
|
|
|
// scss-docs-end pagination-css-vars
|
|
|
|
|
2016-12-28 23:39:06 +01:00
|
|
|
display: flex;
|
2017-09-28 19:25:34 +02:00
|
|
|
@include list-unstyled();
|
2015-10-30 06:24:25 +01:00
|
|
|
}
|
2014-12-02 23:02:35 +01:00
|
|
|
|
2017-10-22 23:17:28 +02:00
|
|
|
.page-link {
|
|
|
|
position: relative;
|
|
|
|
display: block;
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
padding: var(--#{$prefix}pagination-padding-y) var(--#{$prefix}pagination-padding-x);
|
2022-03-31 18:12:52 +02:00
|
|
|
@include font-size(var(--#{$prefix}pagination-font-size));
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
color: var(--#{$prefix}pagination-color);
|
2020-03-05 15:22:52 +01:00
|
|
|
text-decoration: if($link-decoration == none, null, none);
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
background-color: var(--#{$prefix}pagination-bg);
|
|
|
|
border: var(--#{$prefix}pagination-border-width) solid var(--#{$prefix}pagination-border-color);
|
2020-08-01 21:46:47 +02:00
|
|
|
@include transition($pagination-transition);
|
2017-10-22 23:17:28 +02:00
|
|
|
|
2017-12-31 07:50:43 +01:00
|
|
|
&:hover {
|
2018-02-03 08:54:08 +01:00
|
|
|
z-index: 2;
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
color: var(--#{$prefix}pagination-hover-color);
|
2020-03-20 09:35:55 +01:00
|
|
|
text-decoration: if($link-hover-decoration == underline, none, null);
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
background-color: var(--#{$prefix}pagination-hover-bg);
|
|
|
|
border-color: var(--#{$prefix}pagination-hover-border-color);
|
2017-10-22 23:17:28 +02:00
|
|
|
}
|
Opinionated: reintroduce `cursor:pointer`
Explicitly re-adds the "hand" `cursor:pointer` for non-disabled `.btn`, `.close`, `.navbar-toggler` elements, as well as forcing `page-link` pagination controls to always have the "hand" cursor (even if an author uses it on, say, `<button>` elements for a dynamically updating in-page pagination).
Controversial, as everybody jumped on the bandwagon following this article https://medium.com/simple-human/buttons-shouldnt-have-a-hand-cursor-b11e99ca374b - which does have its merits of course, but there are also counter-arguments like http://kizu.ru/en/issues/cursor-pointer/
And seeing the amount of issues we've seen following the change, and the potential complexity needed to consistently address the cursor issue (see https://github.com/twbs/bootstrap/issues/24156 where i explore how the cursor needs to be based on "intent", and how that's tough to determine), I'm favouring an opinionated take here of just reintroducing the `cursor:pointer`.
2017-12-26 00:15:21 +01:00
|
|
|
|
2017-12-31 07:50:43 +01:00
|
|
|
&:focus {
|
2019-05-18 16:30:57 +02:00
|
|
|
z-index: 3;
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
color: var(--#{$prefix}pagination-focus-color);
|
|
|
|
background-color: var(--#{$prefix}pagination-focus-bg);
|
2018-01-19 01:47:47 +01:00
|
|
|
outline: $pagination-focus-outline;
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
box-shadow: var(--#{$prefix}pagination-focus-box-shadow);
|
Opinionated: reintroduce `cursor:pointer`
Explicitly re-adds the "hand" `cursor:pointer` for non-disabled `.btn`, `.close`, `.navbar-toggler` elements, as well as forcing `page-link` pagination controls to always have the "hand" cursor (even if an author uses it on, say, `<button>` elements for a dynamically updating in-page pagination).
Controversial, as everybody jumped on the bandwagon following this article https://medium.com/simple-human/buttons-shouldnt-have-a-hand-cursor-b11e99ca374b - which does have its merits of course, but there are also counter-arguments like http://kizu.ru/en/issues/cursor-pointer/
And seeing the amount of issues we've seen following the change, and the potential complexity needed to consistently address the cursor issue (see https://github.com/twbs/bootstrap/issues/24156 where i explore how the cursor needs to be based on "intent", and how that's tough to determine), I'm favouring an opinionated take here of just reintroducing the `cursor:pointer`.
2017-12-26 00:15:21 +01:00
|
|
|
}
|
2022-03-11 20:25:41 +01:00
|
|
|
|
|
|
|
&.active,
|
|
|
|
.active > & {
|
|
|
|
z-index: 3;
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
color: var(--#{$prefix}pagination-active-color);
|
|
|
|
@include gradient-bg(var(--#{$prefix}pagination-active-bg));
|
|
|
|
border-color: var(--#{$prefix}pagination-active-border-color);
|
2022-03-11 20:25:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
&.disabled,
|
|
|
|
.disabled > & {
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
color: var(--#{$prefix}pagination-disabled-color);
|
2022-03-11 20:25:41 +01:00
|
|
|
pointer-events: none;
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
background-color: var(--#{$prefix}pagination-disabled-bg);
|
|
|
|
border-color: var(--#{$prefix}pagination-disabled-border-color);
|
2022-03-11 20:25:41 +01:00
|
|
|
}
|
2017-10-22 23:17:28 +02:00
|
|
|
}
|
|
|
|
|
2015-12-08 07:24:50 +01:00
|
|
|
.page-item {
|
2019-08-03 16:11:57 +02:00
|
|
|
&:not(:first-child) .page-link {
|
2020-06-26 16:06:20 +02:00
|
|
|
margin-left: $pagination-margin-start;
|
2014-12-02 23:02:35 +01:00
|
|
|
}
|
|
|
|
|
2022-03-14 21:01:03 +01:00
|
|
|
@if $pagination-margin-start == (calc($pagination-border-width * -1)) {
|
2022-02-16 19:26:24 +01:00
|
|
|
&:first-child {
|
|
|
|
.page-link {
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
@include border-start-radius(var(--#{$prefix}pagination-border-radius));
|
2022-02-16 19:26:24 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
.page-link {
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
@include border-end-radius(var(--#{$prefix}pagination-border-radius));
|
2022-02-16 19:26:24 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} @else {
|
|
|
|
// Add border-radius to all pageLinks in case they have left margin
|
|
|
|
.page-link {
|
Add additional root variables, rename `$variable-prefix` to `$prefix` (#35981)
* Add additional root variables, rename $variable-prefix to $prefix
- Adds new root CSS variables for border-radius, border-width, border-color, and border-style
- Adds new root CSS variables for heading-color, link-colors, code color, and highlight color
- Replaces most instances of Sass variables (for border-radius, border-color, border-style, and border-width) for CSS variables inside _variables.scss
- Updates $mark-padding to be an even pixel number
- Renames $variable-prefix to $prefix throughout
* Bundlewatch
2022-03-13 18:13:09 +01:00
|
|
|
@include border-radius(var(--#{$prefix}pagination-border-radius));
|
2022-02-16 19:26:24 +01:00
|
|
|
}
|
|
|
|
}
|
2014-12-02 23:02:35 +01:00
|
|
|
}
|
|
|
|
|
2015-04-18 20:38:47 +02:00
|
|
|
|
|
|
|
//
|
2014-12-02 23:02:35 +01:00
|
|
|
// Sizing
|
2015-04-18 20:38:47 +02:00
|
|
|
//
|
2014-12-02 23:02:35 +01:00
|
|
|
|
|
|
|
.pagination-lg {
|
2020-12-14 14:34:01 +01:00
|
|
|
@include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $pagination-border-radius-lg);
|
2014-12-02 23:02:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.pagination-sm {
|
2020-12-14 14:34:01 +01:00
|
|
|
@include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $pagination-border-radius-sm);
|
2014-12-02 23:02:35 +01:00
|
|
|
}
|