wagtail/client/scss/components/_header.scss

230 wiersze
3.4 KiB
SCSS
Czysty Zwykły widok Historia

@use 'sass:math';
@use 'sass:color';
header {
@apply w-bg-grey-50 w-text-primary w-border-b w-border-grey-100 w-py-4 w-mb-8;
a {
@apply w-text-primary w-underline;
}
h1,
h2 {
@apply w-text-primary;
margin: 0;
}
h1 {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
&.icon:before {
width: 1em;
display: none;
margin-inline-end: 0.4em;
font-size: 1.5em;
}
span {
margin-inline-start: 0.3125rem;
}
}
.col {
float: left;
margin-inline-end: 2em;
}
.left {
float: left;
display: flex;
align-items: center;
flex-wrap: wrap;
.hasform &:first-child {
padding-bottom: 0.5em;
float: none;
}
}
2015-11-03 12:15:33 +00:00
.right {
text-align: end;
float: right;
}
.search-form .icon {
@include svg-icon(1.3rem);
color: color.adjust($color-white, $lightness: -20%);
position: absolute;
top: 0.3em;
// Remove once we drop support for Safari 13.
// stylelint-disable-next-line property-disallowed-list
left: 0.5em;
inset-inline-start: 0.5em;
}
// For case where content below header should merge with it
&.merged {
margin-bottom: 0;
}
2015-11-03 12:15:33 +00:00
&.header-with-breadcrumb {
padding-top: 0;
.breadcrumb {
margin-bottom: 1rem;
padding-inline-start: math.div(
$desktop-nice-padding,
2
); // rather than padding-inline-start: revert;
}
}
&.no-border {
border: 0;
2021-12-21 11:13:08 +00:00
@include media-breakpoint-down(xs) {
// To all hamburger menu to be visible
padding-inline-start: 1.6em;
padding-inline-end: 1.6em;
padding-top: 11px;
2021-12-21 11:13:08 +00:00
.nice-padding {
margin-inline-start: -$desktop-nice-padding;
}
}
}
2016-10-27 07:28:43 +00:00
&.merged.no-border {
padding-bottom: 0;
}
&.no-v-padding {
padding-top: 0;
padding-bottom: 0;
}
2016-10-27 07:28:43 +00:00
.button {
background-color: $color-teal-darker;
2015-11-03 12:15:33 +00:00
&:hover {
background-color: $color-teal-dark;
}
}
2015-11-03 12:15:33 +00:00
label {
@include visuallyhidden();
}
2015-11-03 12:15:33 +00:00
input[type='text'],
select {
border-width: 0;
&:focus {
background-color: $color-white;
}
}
.error-message {
color: inherit;
}
.fields {
margin-top: -0.5em;
li {
padding-bottom: 0;
}
.field {
padding: 0;
}
}
.field-content {
width: auto;
padding: 0;
}
2015-11-03 12:15:33 +00:00
.last-updated {
ul {
padding: 0;
}
li {
display: inline;
margin-inline-end: 2em;
}
.avatar.small {
margin-inline-start: 0;
}
a {
font-weight: bold;
}
}
}
// Media for Windows High Contrast
@media (forced-colors: $media-forced-colours) {
header .field-content {
border: 0.1em solid $system-color-link-text;
}
}
@include media-breakpoint-up(sm) {
header {
.left {
float: left;
margin-inline-end: 0;
&:first-child {
padding-bottom: 0;
float: left;
}
}
2015-11-03 12:15:33 +00:00
.second {
clear: none;
.right,
.left {
float: right;
}
}
h1.icon:before {
display: inline-block;
}
.col3 {
@include column(3);
}
2015-11-03 12:15:33 +00:00
.col3.actionbutton {
width: auto;
}
2015-11-03 12:15:33 +00:00
.col6 {
@include column(6);
}
2015-11-03 12:15:33 +00:00
.col9 {
@include column(9);
}
}
2015-11-03 12:15:33 +00:00
}
.header-title {
@include media-breakpoint-down(xs) {
padding-inline-start: $mobile-nav-indent;
}
&-icon {
@include svg-icon();
margin-inline-end: 0.5em;
}
}