drupal/core/themes/claro/css/components/tabs.css

301 lines
5.4 KiB
CSS

/*
* DO NOT EDIT THIS FILE.
* See the following change record for more information,
* https://www.drupal.org/node/3084859
* @preserve
*/
/**
* Tabs.
*/
:root {
/**
* Tabs.
*/ /* 48px */ /* 40px */
}
.tabs-wrapper > nav {
width: 100%;
}
.tabs {
display: flex;
flex-direction: column;
width: 100%;
margin: 0 0 1.5rem 0;
border: 1px solid #d3d4d9;
border-radius: 2px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
[dir="rtl"] .tabs {
margin: 0 0 1.5rem 0;
}
.tabs__tab {
position: relative;
border-bottom: 1px solid #d3d4d9;
background-color: #f9faff;
font-size: 0.889rem;
font-weight: bold;
}
.tabs__tab:last-child {
border-bottom: 0;
}
.tabs__tab.is-active {
display: flex;
justify-content: space-between;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.tabs__link {
position: relative;
display: flex;
overflow: hidden;
flex-grow: 1;
align-items: center;
box-sizing: border-box;
min-height: 3rem;
padding: 0.75rem 1.5rem;
text-decoration: none;
color: #55565b;
line-height: 1.2rem;
}
.tabs__link:focus {
min-height: calc(3rem + 2px);
margin: -1px;
padding-left: calc(1.5rem - 2px); /* LTR */
text-decoration: none;
color: #55565b;
border: 3px solid #26a769;
border-radius: 2px;
outline: none;
box-shadow: none;
}
[dir="rtl"] .tabs__link:focus {
padding-right: calc(1.5rem - 2px);
padding-left: 1.5rem;
}
.tabs__link:hover {
text-decoration: none;
color: #232429;
}
.tabs__link.is-active {
z-index: 1;
flex-grow: 1;
color: #003cc5;
}
.tabs__link.is-active:focus {
margin: -1px 0;
padding-right: 1.5rem;
padding-left: 1.5rem;
border-left: none; /* LTR */
border-radius: 0;
}
.tabs__link:not(.is-active):focus {
z-index: 3;
}
[dir="rtl"] .tabs__link.is-active:focus {
border-right: none;
border-left: 3px solid #26a769;
}
.tabs__link.is-active:hover {
color: #232429;
}
/* Active and hover indicator. */
.tabs__tab::before,
.tabs__link::before {
position: absolute;
display: block;
content: "";
}
.tabs__tab.is-active::before {
z-index: 2;
top: -1px;
left: -1px; /* LTR */
width: 0.1875rem;
height: calc(100% + 2px);
border-left: 3px solid #003cc5; /* LTR */
border-top-left-radius: 2px; /* LTR */
}
[dir="rtl"] .tabs__tab.is-active::before {
right: -1px;
left: auto;
border-right: 3px solid #003cc5;
border-left: none;
border-radius: 0 2px 0 2px;
}
.tabs.is-open .tabs__tab.is-active::before {
border-bottom-left-radius: 0; /* LTR */
}
[dir="rtl"] .tabs.is-open .tabs__tab.is-active::before {
border-bottom-right-radius: 2px;
}
.tabs__tab.is-active:focus::before {
top: -0.1875rem;
height: calc(3rem + 2px);
}
.tabs__tab:not(.is-active) {
display: none;
}
.tabs--secondary .tabs__tab:not(.is-active) {
display: block;
}
.tabs.is-open > .tabs__tab {
display: flex;
}
.tabs__trigger {
display: flex;
flex-shrink: 0;
align-items: center;
justify-content: center;
width: 3rem;
padding-right: 1px;
text-align: center;
border-left: 1px solid rgba(216, 217, 224, 0.8); /* LTR */
}
[dir="rtl"] .tabs__trigger {
border-right: 1px solid rgba(216, 217, 224, 0.8);
border-left: none;
}
.tabs__trigger:focus {
padding-right: 0;
border: 3px solid #26a769;
border-radius: 2px;
box-shadow: none;
}
@media screen and (min-width: 48em) {
.tabs-wrapper {
display: flex;
}
.is-horizontal .tabs {
flex-direction: row;
width: auto;
margin: 0;
border: 0;
box-shadow: none;
}
.is-horizontal .tabs--secondary {
overflow: hidden;
margin: -0.375rem -0.375rem 0;
padding: 0.375rem 0.375rem 0;
border-radius: 0;
}
.is-horizontal .tabs--secondary .tabs__tab {
font-size: 0.889rem;
}
.is-horizontal .tabs--secondary .tabs__link {
min-height: 2.5rem;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
.is-horizontal .tabs--secondary .tabs__link:focus {
min-height: 2.5rem;
}
.is-horizontal .tabs--secondary::after {
position: absolute;
bottom: 0;
left: 0;
display: block;
width: 100%;
content: "";
border-bottom: 1px solid #d3d4d9;
}
.is-horizontal .tabs__tab {
border-top: none;
border-bottom: none;
background: none;
font-size: 1rem;
}
.is-horizontal .tabs__tab.is-active {
order: 0;
background: none;
box-shadow: none;
}
.is-horizontal .tabs__tab.is-active::before {
content: none;
}
.is-horizontal .tabs__tab .tabs__link.is-active::before {
border-radius: 0;
}
.is-horizontal .tabs__trigger {
display: none;
}
.is-horizontal .tabs__tab {
display: block;
}
.is-horizontal .tabs__link {
padding-right: 2rem;
padding-left: 2rem;
border-radius: 2px 2px 0 0;
}
.is-horizontal .tabs__link:focus {
min-height: 3rem;
margin: 0;
padding-right: 2rem;
padding-left: 2rem;
color: #232429;
border: none;
border-radius: 2px 2px 0 0;
outline: 2px dotted transparent;
box-shadow: 0 0 0 2px #fff, 0 0 0 5px #26a769;
}
[dir="rtl"] .is-horizontal .tabs__link:focus {
border: none;
}
.is-horizontal .tabs--primary .tabs__link:focus {
box-shadow: 0 0 0 2px #f3f4f9, 0 0 0 5px #26a769;
}
.is-horizontal .tabs__link:hover {
color: #0036b1;
background: #e6ecf8;
}
.is-horizontal .tabs__link.is-active::before {
top: auto;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 0.1875rem;
border-right: none;
border-bottom: 3px solid #003cc5;
border-left: none;
}
}