2014-12-02 23:02:35 +01:00
|
|
|
.pagination {
|
2016-12-28 23:39:06 +01:00
|
|
|
display: flex;
|
2017-09-28 19:25:34 +02:00
|
|
|
@include list-unstyled();
|
2014-12-02 23:02:35 +01:00
|
|
|
@include border-radius();
|
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;
|
|
|
|
padding: $pagination-padding-y $pagination-padding-x;
|
|
|
|
margin-left: -$pagination-border-width;
|
|
|
|
line-height: $pagination-line-height;
|
|
|
|
color: $pagination-color;
|
|
|
|
background-color: $pagination-bg;
|
|
|
|
border: $pagination-border-width solid $pagination-border-color;
|
|
|
|
|
2017-12-31 07:50:43 +01:00
|
|
|
&:hover {
|
2018-02-03 08:54:08 +01:00
|
|
|
z-index: 2;
|
2017-10-22 23:17:28 +02:00
|
|
|
color: $pagination-hover-color;
|
|
|
|
text-decoration: none;
|
|
|
|
background-color: $pagination-hover-bg;
|
|
|
|
border-color: $pagination-hover-border-color;
|
|
|
|
}
|
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 {
|
|
|
|
z-index: 2;
|
2018-01-19 01:47:47 +01:00
|
|
|
outline: $pagination-focus-outline;
|
2017-12-31 07:50:43 +01:00
|
|
|
box-shadow: $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
|
|
|
|
|
|
|
// Opinionated: add "hand" cursor to non-disabled .page-link elements
|
2018-01-15 21:51:01 +01:00
|
|
|
&:not(:disabled):not(.disabled) {
|
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
|
|
|
cursor: pointer;
|
|
|
|
}
|
2017-10-22 23:17:28 +02:00
|
|
|
}
|
|
|
|
|
2015-12-08 07:24:50 +01:00
|
|
|
.page-item {
|
2015-10-30 06:24:25 +01:00
|
|
|
&:first-child {
|
2015-10-30 06:03:06 +01:00
|
|
|
.page-link {
|
2015-10-30 06:24:25 +01:00
|
|
|
margin-left: 0;
|
|
|
|
@include border-left-radius($border-radius);
|
2014-12-02 23:02:35 +01:00
|
|
|
}
|
|
|
|
}
|
2015-10-30 06:24:25 +01:00
|
|
|
&:last-child {
|
|
|
|
.page-link {
|
|
|
|
@include border-right-radius($border-radius);
|
2014-12-02 23:02:35 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-30 06:24:25 +01:00
|
|
|
&.active .page-link {
|
2017-10-20 09:01:29 +02:00
|
|
|
z-index: 1;
|
2016-12-28 23:41:00 +01:00
|
|
|
color: $pagination-active-color;
|
|
|
|
background-color: $pagination-active-bg;
|
2017-04-17 00:45:10 +02:00
|
|
|
border-color: $pagination-active-border-color;
|
2014-12-02 23:02:35 +01:00
|
|
|
}
|
|
|
|
|
2015-10-30 06:24:25 +01:00
|
|
|
&.disabled .page-link {
|
2016-12-28 23:41:00 +01:00
|
|
|
color: $pagination-disabled-color;
|
|
|
|
pointer-events: none;
|
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
|
|
|
// Opinionated: remove the "hand" cursor set previously for .page-link
|
|
|
|
cursor: auto;
|
2016-12-28 23:41:00 +01:00
|
|
|
background-color: $pagination-disabled-bg;
|
2017-04-17 00:45:10 +02:00
|
|
|
border-color: $pagination-disabled-border-color;
|
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 {
|
2015-08-14 08:04:16 +02:00
|
|
|
@include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $border-radius-lg);
|
2014-12-02 23:02:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.pagination-sm {
|
2015-08-14 08:04:16 +02:00
|
|
|
@include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $line-height-sm, $border-radius-sm);
|
2014-12-02 23:02:35 +01:00
|
|
|
}
|