ant-design-blazor/components/tabs/style/index.less

226 lines
4.5 KiB
Plaintext
Raw Normal View History

@import '../../style/themes/index';
@import '../../style/mixins/index';
2020-05-31 16:00:40 +08:00
@import './size';
@import './rtl';
@import './position';
@import './dropdown';
@import './card';
@tab-prefix-cls: ~'@{ant-prefix}-tabs';
.@{tab-prefix-cls} {
2021-01-09 09:07:02 +08:00
.reset-component();
2020-05-31 16:00:40 +08:00
display: flex;
overflow: hidden;
2020-05-31 16:00:40 +08:00
// ========================== Navigation ==========================
2020-06-02 19:17:27 +08:00
> .@{tab-prefix-cls}-nav,
> div > .@{tab-prefix-cls}-nav {
position: relative;
2020-05-31 16:00:40 +08:00
display: flex;
flex: none;
align-items: center;
2020-05-31 16:00:40 +08:00
.@{tab-prefix-cls}-nav-wrap {
position: relative;
display: inline-block;
display: flex;
flex: auto;
2020-06-02 19:17:27 +08:00
align-self: stretch;
2020-05-31 16:00:40 +08:00
overflow: hidden;
white-space: nowrap;
transform: translate(0); // Fix chrome render bug
// >>>>> Ping shadow
&::before,
&::after {
position: absolute;
z-index: 1;
opacity: 0;
transition: opacity @animation-duration-slow;
content: '';
pointer-events: none;
}
}
2020-05-31 16:00:40 +08:00
.@{tab-prefix-cls}-nav-list {
position: relative;
display: flex;
transition: transform @animation-duration-slow;
}
2020-05-31 16:00:40 +08:00
// >>>>>>>> Operations
.@{tab-prefix-cls}-nav-operations {
display: flex;
align-self: stretch;
2020-05-31 16:00:40 +08:00
&-hidden {
position: absolute;
visibility: hidden;
pointer-events: none;
}
}
2020-05-31 16:00:40 +08:00
.@{tab-prefix-cls}-nav-more {
position: relative;
2020-05-31 16:00:40 +08:00
padding: @tabs-card-horizontal-padding;
background: transparent;
border: 0;
2020-05-31 16:00:40 +08:00
&::after {
position: absolute;
2020-05-31 16:00:40 +08:00
right: 0;
bottom: 0;
left: 0;
2020-05-31 16:00:40 +08:00
height: 5px;
transform: translateY(100%);
content: '';
}
2020-05-31 16:00:40 +08:00
}
2020-05-31 16:00:40 +08:00
.@{tab-prefix-cls}-nav-add {
2020-07-01 21:38:23 +08:00
min-width: @tabs-card-height;
2020-05-31 16:00:40 +08:00
padding: 0 @padding-xs;
background: @tabs-card-head-background;
border: @border-width-base @border-style-base @border-color-split;
border-radius: @border-radius-base @border-radius-base 0 0;
outline: none;
cursor: pointer;
transition: all @animation-duration-slow @ease-in-out;
&:hover {
color: @tabs-hover-color;
}
2020-05-31 16:00:40 +08:00
&:active,
&:focus {
color: @tabs-active-color;
}
}
}
2020-05-31 16:00:40 +08:00
&-extra-content {
flex: none;
}
2020-07-01 21:38:23 +08:00
&-centered {
> .@{tab-prefix-cls}-nav,
> div > .@{tab-prefix-cls}-nav {
.@{tab-prefix-cls}-nav-wrap {
&:not([class*='@{tab-prefix-cls}-nav-wrap-ping']) {
justify-content: center;
}
}
}
}
2020-05-31 16:00:40 +08:00
// ============================ InkBar ============================
&-ink-bar {
position: absolute;
background: @tabs-ink-bar-color;
pointer-events: none;
}
2020-05-31 16:00:40 +08:00
// ============================= Tabs =============================
&-tab {
position: relative;
display: inline-flex;
align-items: center;
margin: @tabs-horizontal-margin;
padding: @tabs-horizontal-padding;
font-size: @tabs-title-font-size;
background: transparent;
border: 0;
2020-04-06 17:35:04 +08:00
outline: none;
2020-05-31 16:00:40 +08:00
cursor: pointer;
2020-05-31 16:00:40 +08:00
&:last-of-type {
margin-right: 0;
margin-left: 0;
}
2020-07-01 21:38:23 +08:00
&-btn,
&-remove {
&:focus,
&:active {
color: @tabs-active-color;
}
}
&-btn {
outline: none;
2020-11-15 17:03:30 +08:00
transition: all 0.3s;
2020-07-01 21:38:23 +08:00
}
&-remove {
2020-05-31 16:00:40 +08:00
flex: none;
margin-right: -@margin-xss;
margin-left: @margin-xs;
color: @text-color-secondary;
font-size: @font-size-sm;
2020-07-01 21:38:23 +08:00
background: transparent;
border: none;
2020-05-31 16:00:40 +08:00
outline: none;
2020-07-01 21:38:23 +08:00
cursor: pointer;
2020-05-31 16:00:40 +08:00
transition: all @animation-duration-slow;
2020-05-31 16:00:40 +08:00
&:hover {
color: @heading-color;
}
}
2020-05-31 16:00:40 +08:00
&:hover {
color: @tabs-hover-color;
}
2020-07-01 21:38:23 +08:00
&&-active &-btn {
2020-05-31 16:00:40 +08:00
color: @tabs-highlight-color;
font-weight: 500;
}
2020-05-31 16:00:40 +08:00
&&-disabled {
color: @disabled-color;
cursor: not-allowed;
}
2020-08-02 15:13:53 +08:00
&&-disabled &-btn,
&&-disabled &-remove {
&:focus,
&:active {
color: @disabled-color;
}
}
2020-07-01 21:38:23 +08:00
& &-remove .@{iconfont-css-prefix} {
margin: 0;
}
2020-05-31 16:00:40 +08:00
.@{iconfont-css-prefix} {
margin-right: @margin-sm;
}
}
2020-05-31 16:00:40 +08:00
// =========================== TabPanes ===========================
&-content {
&-holder {
flex: auto;
2020-06-21 23:15:22 +08:00
min-width: 0;
min-height: 0;
}
2020-05-31 16:00:40 +08:00
display: flex;
width: 100%;
2020-05-31 16:00:40 +08:00
&-animated {
transition: margin @animation-duration-slow;
}
}
2020-05-31 16:00:40 +08:00
&-tabpane {
flex: none;
width: 100%;
outline: none;
}
}