ant-design/components/pagination/style/index.less

397 lines
7.9 KiB
Plaintext
Raw Normal View History

meger feature to master (#16421) * use ul in list * update snapshot * update comment * feat: TreeSelect support `showSearch` in multiple mode (#15933) * update rc-tree-select * typo * update desc & snapshot * update desc & snapshot * check default showSearch * feat: table customizing variable (#15971) * feat: added table selected row color variable * fix: @table-selected-row-color default is inherit * feat: Upload support customize previewFile (#15984) * support preview file * use promise * dealy load * use canvas of render * use domHook of test * update demo * add snapshot * update types * update testcase * feat: form customizing variables (#15954) * fix: added styling form input background-color * feat: added '@form-warning-input-bg' variable * feat: added '@form-error-input-bg' variable * use li wrap with comment * feat: Support append theme less file with less-variable (#16118) * add override * add override support * update doc * feat: dropdown support set right icon * docs: update doc of dropdown component * style: format dropdown-button.md * test: update updateSnapshot * style: format dropdown-button.md * test: update updateSnapshot * test: update updateSnapshot * style: change style of dropdown-button demo * fix: fix document table order * feat: Support SkeletonAvatarProps.size accept number (#16078) (#16128) * chore:update style of demo * feat: Notification functions accept top, bottom and getContainer as arguments * drawer: add afterVisibleChange * rm onVisibleChange * update * feat: 🇭🇷 hr_HR locale (#16258) * Added Croatian locale * fixed lint error * :white_check_mark: Add test cases for hr_HR * :memo: update i18n documentation * feat: add `htmlFor` in Form.Item (#16278) * add htmlFor in Form.Item * update doc * feat: Button support `link` type (#16289) close #15892 * feat: Add Timeline.Item.position (#16148) (#16193) * fix: Timeline.pendingDot interface documentation there is a small problem (#16177) * feat: Add Timeline.Item.position (#16148) * doc: add version infomation for Timeline.Item.position * refactor: Update Tree & TreeSelect deps (#16330) * use CSSMotion * update snapshot * feat: Collapse support `expandIconPosition` (#16365) * update doc * support expandIconPosition * update snapshot * feat: Breadcrumb support DropDown (#16315) * breadcrumbs support drop down menu * update doc * add require less * fix test * fix md doc * less code * fix style warning * update snap * add children render test * feat: TreeNode support checkable * feat: add optional to support top and left slick dots (#16186) (#16225) * add optional to support top and left slick dots * update carousel snapshot * Update doc, add placement demo * update carousel placement demo snapshots * rename dots placement to position * update vertical as deprecated * rename dotsPosition to dotPosition * refine code * add warning testcase for vertical * remove unused warning * update expression * Additional test case for dotPosition * refactor: Upgrade `rc-tree-select` to support pure React motion (#16402) * upgrade `rc-tree-select` * update snapshot * 3.17.0 changelog * fix warning * fix review warning
2019-05-06 12:04:39 +08:00
@import '../../style/themes/index';
2018-12-07 16:17:45 +08:00
@import '../../style/mixins/index';
@import '../../input/style/mixin';
2018-12-07 16:17:45 +08:00
@pagination-prefix-cls: ~'@{ant-prefix}-pagination';
2015-07-13 01:04:05 +08:00
2015-08-20 16:55:42 +08:00
.@{pagination-prefix-cls} {
.reset-component;
ul,
ol {
margin: 0;
padding: 0;
list-style: none;
}
2015-07-13 01:04:05 +08:00
&::after {
2015-07-13 01:04:05 +08:00
display: block;
clear: both;
height: 0;
2015-07-13 01:04:05 +08:00
overflow: hidden;
visibility: hidden;
content: ' ';
2015-07-13 01:04:05 +08:00
}
2016-02-25 10:36:58 +08:00
&-total-text {
display: inline-block;
height: @pagination-item-size;
margin-right: 8px;
line-height: @pagination-item-size - 2px;
vertical-align: middle;
2016-02-25 10:36:58 +08:00
}
2015-07-14 12:09:29 +08:00
&-item {
display: inline-block;
min-width: @pagination-item-size;
height: @pagination-item-size;
margin-right: 8px;
font-family: @pagination-font-family;
2018-01-03 21:09:56 +08:00
line-height: @pagination-item-size - 2px;
2015-07-13 01:04:05 +08:00
text-align: center;
vertical-align: middle;
list-style: none;
background-color: @component-background;
border: @border-width-base @border-style-base @border-color-base;
border-radius: @border-radius-base;
outline: 0;
cursor: pointer;
user-select: none;
2015-07-13 01:04:05 +08:00
a {
display: block;
padding: 0 6px;
2016-11-08 20:50:59 +08:00
color: @text-color;
2015-07-16 12:18:20 +08:00
transition: none;
2015-07-13 01:04:05 +08:00
}
&:focus,
2015-07-13 01:04:05 +08:00
&:hover {
2015-07-14 16:50:08 +08:00
border-color: @primary-color;
transition: all 0.3s;
2015-07-13 01:04:05 +08:00
a {
2015-07-14 16:50:08 +08:00
color: @primary-color;
2015-07-13 01:04:05 +08:00
}
}
2015-07-14 12:09:29 +08:00
&-active {
font-weight: @pagination-font-weight-active;
background: @pagination-item-bg-active;
border-color: @primary-color;
2017-12-15 10:30:01 +08:00
a {
color: @primary-color;
}
2015-07-13 01:04:05 +08:00
&:focus,
&:hover {
border-color: @primary-5;
}
&:focus a,
2015-07-14 16:50:08 +08:00
&:hover a {
2017-12-15 10:30:01 +08:00
color: @primary-5;
2015-07-13 01:04:05 +08:00
}
}
}
2015-11-26 19:32:55 +08:00
&-jump-prev,
&-jump-next {
outline: 0;
2018-08-22 20:01:00 +08:00
.@{pagination-prefix-cls}-item-container {
position: relative;
.@{pagination-prefix-cls}-item-link-icon {
.iconfont-size-under-12px(12px);
2019-04-15 10:52:00 +08:00
2018-08-22 20:01:00 +08:00
color: @primary-color;
letter-spacing: -1px;
opacity: 0;
2018-12-07 16:17:45 +08:00
transition: all 0.2s;
2018-08-22 20:01:00 +08:00
&-svg {
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
}
}
2015-07-13 01:04:05 +08:00
2018-08-22 20:01:00 +08:00
.@{pagination-prefix-cls}-item-ellipsis {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: block;
2018-08-22 20:01:00 +08:00
margin: auto;
color: @disabled-color;
letter-spacing: 2px;
text-align: center;
text-indent: 0.13em;
opacity: 1;
transition: all 0.2s;
2018-08-22 20:01:00 +08:00
}
2015-07-13 01:04:05 +08:00
}
&:focus,
2015-07-13 01:04:05 +08:00
&:hover {
2018-08-22 20:01:00 +08:00
.@{pagination-prefix-cls}-item-link-icon {
2018-08-21 17:13:12 +08:00
opacity: 1;
2015-07-13 01:04:05 +08:00
}
2018-08-22 20:01:00 +08:00
.@{pagination-prefix-cls}-item-ellipsis {
opacity: 0;
}
2015-07-13 01:04:05 +08:00
}
}
2015-11-26 19:32:55 +08:00
&-prev,
&-jump-prev,
&-jump-next {
2015-07-13 01:04:05 +08:00
margin-right: 8px;
}
2015-11-26 19:32:55 +08:00
&-prev,
&-next,
&-jump-prev,
&-jump-next {
display: inline-block;
min-width: @pagination-item-size;
height: @pagination-item-size;
color: @text-color;
font-family: @pagination-font-family;
line-height: @pagination-item-size;
2015-07-13 01:04:05 +08:00
text-align: center;
vertical-align: middle;
list-style: none;
border-radius: @border-radius-base;
cursor: pointer;
transition: all 0.3s;
2015-07-13 01:04:05 +08:00
}
2015-11-26 19:32:55 +08:00
&-prev,
&-next {
outline: 0;
2015-07-13 01:04:05 +08:00
a {
2016-11-08 20:50:59 +08:00
color: @text-color;
2017-08-30 14:02:49 +08:00
user-select: none;
}
&:hover a {
2017-12-15 10:30:01 +08:00
border-color: @primary-5;
2017-08-30 14:02:49 +08:00
}
.@{pagination-prefix-cls}-item-link {
display: block;
height: 100%;
font-size: 12px;
text-align: center;
2017-08-30 14:02:49 +08:00
background-color: @component-background;
border: @border-width-base @border-style-base @border-color-base;
2017-08-30 14:02:49 +08:00
border-radius: @border-radius-base;
outline: none;
2018-12-07 16:17:45 +08:00
transition: all 0.3s;
2015-07-13 01:04:05 +08:00
}
2017-08-30 14:02:49 +08:00
&:focus .@{pagination-prefix-cls}-item-link,
&:hover .@{pagination-prefix-cls}-item-link {
color: @primary-color;
border-color: @primary-color;
2015-07-13 14:58:26 +08:00
}
2015-07-14 12:09:29 +08:00
}
&-disabled {
2017-08-30 14:02:49 +08:00
&,
&:hover,
&:focus {
2017-08-30 14:02:49 +08:00
cursor: not-allowed;
a,
.@{pagination-prefix-cls}-item-link {
color: @disabled-color;
border-color: @border-color-base;
2015-07-14 12:09:29 +08:00
cursor: not-allowed;
2015-07-13 01:04:05 +08:00
}
}
}
2015-07-15 15:31:55 +08:00
&-slash {
margin: 0 10px 0 5px;
}
2015-07-14 12:09:29 +08:00
&-options {
display: inline-block;
margin-left: 16px;
vertical-align: middle;
2017-12-17 16:47:11 +08:00
&-size-changer.@{ant-prefix}-select {
display: inline-block;
width: auto;
margin-right: 8px;
2015-07-13 01:04:05 +08:00
}
2015-07-14 12:09:29 +08:00
&-quick-jumper {
display: inline-block;
height: @input-height-base;
line-height: @input-height-base;
vertical-align: top;
2015-07-13 01:04:05 +08:00
input {
2015-07-14 12:09:29 +08:00
.input;
2019-04-15 10:52:00 +08:00
2015-07-13 01:04:05 +08:00
width: 50px;
margin: 0 8px;
2015-07-13 01:04:05 +08:00
}
}
}
2015-07-13 14:58:26 +08:00
2015-11-26 19:32:55 +08:00
&-simple &-prev,
&-simple &-next {
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
vertical-align: top;
.@{pagination-prefix-cls}-item-link {
height: @pagination-item-size-sm;
border: 0;
&::after {
2017-12-17 16:38:58 +08:00
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
}
}
2015-07-13 16:04:07 +08:00
}
2015-07-14 12:09:29 +08:00
&-simple &-simple-pager {
display: inline-block;
height: @pagination-item-size-sm;
margin-right: 8px;
2015-07-13 16:04:07 +08:00
input {
box-sizing: border-box;
height: 100%;
margin-right: 8px;
padding: 0 6px;
text-align: center;
background-color: @component-background;
border: @border-width-base @border-style-base @border-color-base;
border-radius: @border-radius-base;
2015-07-13 16:04:07 +08:00
outline: none;
2018-12-07 16:17:45 +08:00
transition: border-color 0.3s;
2015-07-13 16:04:07 +08:00
&:hover {
2015-07-14 16:50:08 +08:00
border-color: @primary-color;
2015-07-13 16:04:07 +08:00
}
}
}
&.mini &-total-text,
&.mini &-simple-pager {
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2016-02-25 10:36:58 +08:00
}
2015-07-14 12:09:29 +08:00
&.mini &-item {
min-width: @pagination-item-size-sm;
height: @pagination-item-size-sm;
margin: 0;
2018-01-03 21:09:56 +08:00
line-height: @pagination-item-size-sm - 2px;
2015-07-14 12:09:29 +08:00
}
2017-12-10 16:42:40 +08:00
&.mini &-item:not(&-item-active) {
background: transparent;
2017-12-15 10:30:01 +08:00
border-color: transparent;
2017-12-10 16:42:40 +08:00
}
2015-07-14 12:09:29 +08:00
&.mini &-prev,
&.mini &-next {
min-width: @pagination-item-size-sm;
height: @pagination-item-size-sm;
margin: 0;
line-height: @pagination-item-size-sm;
2017-08-30 14:02:49 +08:00
}
&.mini &-prev &-item-link,
&.mini &-next &-item-link {
2017-12-10 16:42:40 +08:00
background: transparent;
border-color: transparent;
&::after {
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2015-07-17 16:24:09 +08:00
}
2015-07-14 12:09:29 +08:00
}
2015-11-26 19:32:55 +08:00
&.mini &-jump-prev,
&.mini &-jump-next {
height: @pagination-item-size-sm;
2017-10-24 20:39:38 +08:00
margin-right: 0;
line-height: @pagination-item-size-sm;
2015-07-14 12:09:29 +08:00
}
&.mini &-options {
margin-left: 2px;
2015-07-14 12:09:29 +08:00
&-quick-jumper {
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2015-07-14 12:09:29 +08:00
input {
.input-sm;
2019-04-15 10:52:00 +08:00
2015-12-05 13:39:24 +08:00
width: 44px;
2015-07-14 12:09:29 +08:00
}
}
}
// ============================ Disabled ============================
&&-disabled {
cursor: not-allowed;
.@{pagination-prefix-cls}-item {
background: @disabled-bg;
2019-05-20 12:05:46 +08:00
border-color: @border-color-base;
cursor: not-allowed;
a {
color: @disabled-color;
background: transparent;
border: none;
2019-05-20 12:05:46 +08:00
cursor: not-allowed;
}
&-active {
background: darken(@disabled-bg, 10%);
2019-05-20 12:05:46 +08:00
border-color: transparent;
a {
color: #fff;
}
}
}
.@{pagination-prefix-cls}-item-link {
&,
&:hover,
&:focus {
color: @text-color-secondary;
background: @disabled-bg;
2019-05-20 12:05:46 +08:00
border-color: @border-color-base;
cursor: not-allowed;
}
}
.@{pagination-prefix-cls}-jump-prev,
.@{pagination-prefix-cls}-jump-next {
&:focus,
&:hover {
.@{pagination-prefix-cls}-item-link-icon {
opacity: 0;
}
.@{pagination-prefix-cls}-item-ellipsis {
opacity: 1;
}
}
}
}
2015-07-14 12:09:29 +08:00
}
@media only screen and (max-width: @screen-lg) {
.@{pagination-prefix-cls}-item {
&-after-jump-prev,
&-before-jump-next {
display: none;
}
}
}
@media only screen and (max-width: @screen-sm) {
.@{pagination-prefix-cls}-options {
display: none;
}
}