0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00
wagtail/client/scss/components/_tabs.scss

162 lines
3.2 KiB
SCSS
Raw Normal View History

.tab-nav {
2014-06-19 13:25:53 +02:00
@include row();
padding: 0;
background: $color-grey-4;
li {
list-style-type: none;
width: 33%;
float: left;
padding: 0;
position: relative;
margin-right: 2px;
2016-10-25 20:22:38 +02:00
&:first-of-type {
padding-left: $desktop-nice-padding;
margin-left: 0;
2016-10-25 20:22:38 +02:00
}
}
2015-11-03 13:15:33 +01:00
h2 {
margin: 0;
font-size: inherit;
}
a {
@include transition(border-color 0.2s ease);
background-color: $color-teal-darker;
text-transform: uppercase;
2020-06-16 17:53:57 +02:00
font-weight: 600;
text-decoration: none;
display: block;
2020-06-18 18:18:08 +02:00
padding: 0.6em 0.7em 0.8em;
2015-11-03 13:15:33 +01:00
color: $color-white;
border-top: 0.3em solid $color-teal-darker;
2020-06-16 17:53:57 +02:00
max-height: 1.44em;
overflow: hidden;
&:hover {
2015-11-03 13:15:33 +01:00
color: $color-white;
border-top-color: rgba(0, 0, 0, 0.35);
}
}
a.errors {
&:after {
border-radius: 50px;
box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.1);
position: absolute;
right: -0.5em;
top: -0.5em;
z-index: 5;
min-width: 0.9em;
2015-11-03 13:15:33 +01:00
color: $color-white;
background: $color-red;
content: attr(data-count);
padding: 0 0.3em;
line-height: 1.4em;
text-align: center;
font-size: 0.8em;
}
2014-02-06 17:41:52 +01:00
}
li.active a {
box-shadow: none;
color: $color-grey-1;
2015-11-03 13:15:33 +01:00
background-color: $color-white;
border-top: 0.3em solid $color-grey-1;
}
2015-11-03 13:15:33 +01:00
// For cases where tab-nav should merge with header
&.merged {
margin-top: 0;
background-color: $color-header-bg;
}
2021-04-07 16:22:00 +02:00
li.right {
float: right;
margin-right: 0;
margin-left: 2px;
}
li.wide {
width: unset;
}
.right {
max-height: 1.44em;
overflow: visible;
}
}
2015-11-03 13:15:33 +01:00
.tab-content {
> section {
display: none;
padding-top: 1em;
&.active {
display: block;
}
}
.page-locked & {
cursor: not-allowed;
user-select: none;
> * {
pointer-events: none;
}
}
}
@include media-breakpoint-up(sm) {
.tab-nav {
// For cases where tab-nav should merge with header
&.merged {
background-color: $color-header-bg;
}
li {
width: auto;
padding: 0;
}
a {
2020-06-16 17:53:57 +02:00
padding-left: $mobile-nice-padding;
padding-right: $mobile-nice-padding;
}
li.settings a {
padding-left: 2em;
padding-right: 2em;
2014-06-19 13:25:53 +02:00
}
}
.modal-content .tab-nav li {
padding: 0;
min-width: 0;
2016-10-25 20:22:38 +02:00
&:first-of-type {
2020-06-16 17:53:57 +02:00
padding-left: $desktop-nice-padding;
2016-10-25 20:22:38 +02:00
}
}
2015-11-03 13:15:33 +01:00
}
2016-10-27 21:27:35 +02:00
@include media-breakpoint-down(xs) {
2016-10-27 21:27:35 +02:00
// To allow tabs on the edit page to be editable
.tab-nav li:first-of-type {
padding-left: 1.6em;
}
.tab-nav li {
width: auto;
2016-10-27 21:27:35 +02:00
}
}
// Media for Windows High Contrast
@media (forced-colors: $media-forced-colours) {
.tab-nav li.active a {
border-bottom: 0.3em solid $system-color-link-text;
}
}