forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_unstable_pagination.scss
175 lines (146 loc) · 4.65 KB
/
_unstable_pagination.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
//
// Copyright IBM Corp. 2016, 2023
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//
@use '../../config' as *;
@use '../../breakpoint' as *;
@use '../../motion' as *;
@use '../../spacing' as *;
@use '../../theme' as *;
@use '../../type' as *;
@use '../../utilities/component-reset';
@use '../../utilities/convert';
@use '../../utilities/focus-outline' as *;
@use '../select';
/// Unstable pagination styles
/// @access private
/// @group pagination
@mixin unstable_pagination {
.#{$prefix}--unstable-pagination {
@include component-reset.reset;
@include type-style('body-compact-01');
display: flex;
align-items: center;
justify-content: space-between;
background-color: $layer;
border-block-end: 1px solid transparent;
border-block-start: 1px solid $border-subtle;
inline-size: 100%;
min-block-size: convert.to-rem(40px);
}
.#{$prefix}--unstable-pagination__text {
@include breakpoint('md') {
display: inline-block;
}
margin: 0 $spacing-05;
color: $text-secondary;
}
.#{$prefix}--unstable-pagination__left,
.#{$prefix}--unstable-pagination__right {
display: flex;
align-items: center;
block-size: 100%;
}
.#{$prefix}--unstable-pagination__left {
padding: 0 $spacing-05 0 0;
}
.#{$prefix}--unstable-pagination__left > .#{$prefix}--form-item,
.#{$prefix}--unstable-pagination__right > .#{$prefix}--form-item {
block-size: 100%;
}
.#{$prefix}--unstable-pagination__left
.#{$prefix}--unstable-pagination__text {
margin-inline-end: convert.to-rem(1px);
}
.#{$prefix}--unstable-pagination__right
.#{$prefix}--unstable-pagination__text {
margin-inline: convert.to-rem(1px) $spacing-05;
}
.#{$prefix}--unstable-pagination__button {
@include component-reset.reset;
display: flex;
align-items: center;
justify-content: center;
border: none;
margin: 0;
background: none;
block-size: convert.to-rem(40px);
border-inline-start: 1px solid $border-subtle;
color: $icon-primary;
cursor: pointer;
fill: $icon-primary;
inline-size: convert.to-rem(40px);
min-block-size: convert.to-rem(32px);
transition:
outline $duration-fast-02 motion(standard, productive),
background-color $duration-fast-02 motion(standard, productive);
}
// Unset height/width set by icon-only button:
.#{$prefix}--unstable-pagination__button .#{$prefix}--btn__icon {
block-size: initial;
inline-size: initial;
}
.#{$prefix}--unstable-pagination__button.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger:focus {
@include focus-outline('outline');
}
.#{$prefix}--unstable-pagination__button:hover {
background: $layer-hover;
color: $icon-primary;
}
.#{$prefix}--unstable-pagination__button--no-index {
cursor: not-allowed;
fill: $icon-disabled;
}
.#{$prefix}--unstable-pagination__button.#{$prefix}--btn:disabled {
border-color: $border-subtle;
background: transparent;
}
.#{$prefix}--unstable-pagination__button:disabled:hover,
.#{$prefix}--unstable-pagination__button--no-index:hover {
background: transparent;
cursor: not-allowed;
fill: $icon-disabled;
}
.#{$prefix}--unstable-pagination__page-selector,
.#{$prefix}--unstable-pagination__page-sizer {
align-items: center;
block-size: 100%;
}
.#{$prefix}--unstable-pagination__page-selector
.#{$prefix}--select-input--inline__wrapper,
.#{$prefix}--unstable-pagination__page-sizer
.#{$prefix}--select-input--inline__wrapper {
display: flex;
block-size: 100%;
}
.#{$prefix}--unstable-pagination__page-selector .#{$prefix}--select-input,
.#{$prefix}--unstable-pagination__page-sizer .#{$prefix}--select-input {
@include type-style('body-short-01');
padding: 0 2.25rem 0 $spacing-05;
block-size: 100%;
inline-size: auto;
line-height: convert.to-rem(40px);
min-inline-size: auto;
}
.#{$prefix}--unstable-pagination__page-selector
.#{$prefix}--select-input:hover,
.#{$prefix}--unstable-pagination__page-sizer .#{$prefix}--select-input:hover {
background: $layer-hover;
}
.#{$prefix}--unstable-pagination__page-selector .#{$prefix}--select__arrow,
.#{$prefix}--unstable-pagination__page-sizer .#{$prefix}--select__arrow {
inset-block-start: 50%;
transform: translateY(-50%);
@include breakpoint('md') {
inset-inline-end: $spacing-05;
}
}
.#{$prefix}--unstable-pagination__page-selector {
border-inline-start: 1px solid $border-subtle;
}
.#{$prefix}--unstable-pagination__page-sizer {
border-inline-end: 1px solid $border-subtle;
}
}