0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
wagtail/client/scss/components/_header.scss

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

236 lines
3.5 KiB
SCSS
Raw Normal View History

@use 'sass:math';
@use 'sass:color';
header {
@apply w-text-primary w-mb-8;
a {
@apply w-text-primary w-underline;
}
h1,
h2 {
@apply w-text-primary;
margin: 0;
}
h1 {
@apply w-h1;
position: relative;
> svg.icon {
position: absolute;
inset-inline-start: -1.5em;
top: 0.125em;
max-width: 1em;
max-height: 1em;
vertical-align: text-top;
}
span {
margin-inline-start: 0.3125rem;
font-weight: 400;
}
}
// Give padding to the rows inside of headers so that nested breadcrumbs aren't padded by their parent header el.
// Use header--with-padding for headers that don't contain .row elements.
&.header--with-padding,
> .row {
padding-top: 0.5rem;
padding-bottom: 1.5rem;
padding-inline-start: 110px;
padding-inline-end: 20px;
}
.breadcrumb + .row {
padding-inline-start: $mobile-nav-indent + 10px;
}
&.merged .w-breadcrumb {
padding-inline-start: $mobile-nav-indent;
}
&.header--home {
@include nice-padding();
padding-top: 0.5rem;
margin-top: $mobile-nav-indent;
}
.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 13:15:33 +01:00
.right {
text-align: end;
float: right;
}
.search-form .icon {
@include svg-icon(1.2rem);
color: theme('colors.primary.DEFAULT');
position: absolute;
top: 0;
height: 100%;
inset-inline-start: 0.7em;
}
// For case where content below header should merge with it
&.merged {
margin-bottom: 0;
padding-bottom: 1rem;
}
2021-12-21 12:13:08 +01:00
&.no-border {
border: 0;
}
2016-10-27 09:28:43 +02:00
&.merged.no-border {
2016-10-27 09:28:43 +02:00
padding-bottom: 0;
}
&.no-v-padding {
padding-top: 0;
padding-bottom: 0;
2016-10-27 09:28:43 +02:00
}
.button {
background-color: $color-teal-darker;
2015-11-03 13:15:33 +01:00
&:hover {
background-color: $color-teal-dark;
}
}
2015-11-03 13:15:33 +01:00
.button-secondary {
color: $color-teal-darker;
background-color: transparent;
}
2015-11-03 13:15:33 +01:00
label {
@include visuallyhidden();
}
.error-message {
color: inherit;
}
2015-11-02 15:39:36 +01:00
.fields {
margin-top: -0.5em;
li {
2015-11-03 13:15:33 +01:00
padding-bottom: 0;
}
.field {
padding: 0;
}
}
.field-content {
width: auto;
padding: 0;
2014-05-13 18:19:41 +02:00
}
2015-11-03 13:15:33 +01: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 {
.row {
padding-top: 1.5rem;
padding-inline-start: 90px;
padding-inline-end: 90px;
}
.breadcrumb + .row {
padding-inline-start: 90px;
}
&.merged .w-breadcrumb {
padding-inline-start: 0;
}
&.header--home {
padding-top: 1.5rem;
margin-top: 0;
}
.left {
float: left;
margin-inline-end: 0;
&:first-child {
padding-bottom: 0;
float: left;
}
}
2015-11-03 13:15:33 +01:00
.second {
clear: none;
2016-10-27 21:43:18 +02:00
.right,
2015-11-02 15:39:36 +01:00
.left {
float: right;
}
}
h1.icon:before {
display: inline-block;
}
.col3 {
@include column(3);
}
2015-11-03 13:15:33 +01:00
.col3.actionbutton {
width: auto;
}
2015-11-03 13:15:33 +01:00
.col6 {
@include column(6);
}
2015-11-03 13:15:33 +01:00
.col9 {
@include column(9);
}
}
2015-11-03 13:15:33 +01:00
}