bulma/sass/components/pagination.sass

135 lines
3.1 KiB
Sass
Raw Normal View History

2017-07-28 20:05:15 +00:00
$pagination-color: $grey-darker !default
$pagination-border-color: $grey-lighter !default
$pagination-margin: -0.25rem !default
2016-12-22 20:23:34 +00:00
2017-07-28 20:05:15 +00:00
$pagination-hover-color: $link-hover !default
$pagination-hover-border-color: $link-hover-border !default
2016-12-22 20:23:34 +00:00
2017-07-28 20:05:15 +00:00
$pagination-focus-color: $link-focus !default
$pagination-focus-border-color: $link-focus-border !default
2016-12-22 20:23:34 +00:00
2017-07-28 20:05:15 +00:00
$pagination-active-color: $link-active !default
$pagination-active-border-color: $link-active-border !default
2016-12-22 20:23:34 +00:00
2017-07-28 20:05:15 +00:00
$pagination-disabled-color: $grey !default
$pagination-disabled-background-color: $grey-lighter !default
$pagination-disabled-border-color: $grey-lighter !default
2016-12-22 20:23:34 +00:00
2017-07-28 20:05:15 +00:00
$pagination-current-color: $link-invert !default
$pagination-current-background-color: $link !default
$pagination-current-border-color: $link !default
2016-12-22 20:23:34 +00:00
2017-07-28 20:05:15 +00:00
$pagination-ellipsis-color: $grey-light !default
2016-12-22 20:23:34 +00:00
$pagination-shadow-inset: inset 0 1px 2px rgba($black, 0.2)
2016-10-30 22:31:54 +00:00
.pagination
font-size: $size-normal
2017-07-28 20:05:15 +00:00
margin: $pagination-margin
// Sizes
&.is-small
font-size: $size-small
&.is-medium
font-size: $size-medium
&.is-large
font-size: $size-large
2016-10-30 22:31:54 +00:00
.pagination,
.pagination-list
2016-03-26 14:12:36 +00:00
align-items: center
display: flex
justify-content: center
text-align: center
2016-10-30 22:31:54 +00:00
.pagination-previous,
.pagination-next,
.pagination-link,
.pagination-ellipsis
+control
+unselectable
font-size: 1em
2016-10-30 22:31:54 +00:00
padding-left: 0.5em
padding-right: 0.5em
justify-content: center
2017-04-15 17:15:00 +00:00
margin: 0.25rem
2016-10-30 22:31:54 +00:00
text-align: center
.pagination-previous,
.pagination-next,
.pagination-link
2017-07-28 20:05:15 +00:00
border-color: $pagination-border-color
2017-03-13 12:05:02 +00:00
min-width: 2.25em
2016-10-30 22:31:54 +00:00
&:hover
2017-07-28 20:05:15 +00:00
border-color: $pagination-hover-border-color
color: $pagination-hover-color
2016-10-30 22:31:54 +00:00
&:focus
2017-07-28 20:05:15 +00:00
border-color: $pagination-focus-border-color
2016-10-30 22:31:54 +00:00
&:active
2016-12-22 20:23:34 +00:00
box-shadow: $pagination-shadow-inset
2017-03-31 21:25:53 +00:00
&[disabled]
2017-07-28 20:05:15 +00:00
background-color: $pagination-disabled-background-color
border-color: $pagination-disabled-border-color
box-shadow: none
2017-07-28 20:05:15 +00:00
color: $pagination-disabled-color
2016-10-30 22:31:54 +00:00
opacity: 0.5
.pagination-previous,
.pagination-next
padding-left: 0.75em
padding-right: 0.75em
2017-04-15 17:15:00 +00:00
white-space: nowrap
2016-10-30 22:31:54 +00:00
.pagination-link
&.is-current
2017-07-28 20:05:15 +00:00
background-color: $pagination-current-background-color
border-color: $pagination-current-border-color
color: $pagination-current-color
2016-10-30 22:31:54 +00:00
.pagination-ellipsis
2017-07-28 20:05:15 +00:00
color: $pagination-ellipsis-color
2016-10-30 22:31:54 +00:00
pointer-events: none
.pagination-list
2017-04-15 17:15:00 +00:00
flex-wrap: wrap
2016-10-30 22:31:54 +00:00
+mobile
.pagination
2016-03-26 14:12:36 +00:00
flex-wrap: wrap
2016-10-30 22:31:54 +00:00
.pagination-previous,
.pagination-next
flex-grow: 1
flex-shrink: 1
.pagination-list
2016-03-26 14:12:36 +00:00
li
2016-07-31 10:45:56 +00:00
flex-grow: 1
2016-10-30 22:31:54 +00:00
flex-shrink: 1
+tablet
.pagination-list
flex-grow: 1
flex-shrink: 1
justify-content: flex-start
order: 1
.pagination-previous
order: 2
.pagination-next
order: 3
.pagination
justify-content: space-between
&.is-centered
.pagination-previous
order: 1
.pagination-list
justify-content: center
order: 2
.pagination-next
order: 3
&.is-right
.pagination-previous
2016-03-26 14:12:36 +00:00
order: 1
2016-10-30 22:31:54 +00:00
.pagination-next
order: 2
.pagination-list
justify-content: flex-end
order: 3