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.

247 lines
3.6 KiB
SCSS
Raw Normal View History

@use 'sass:math';
header {
padding-top: 1em;
padding-bottom: 1em;
background-color: $color-header-bg;
margin-bottom: 2em;
2015-11-03 13:15:33 +01:00
color: $color-white;
a {
2015-11-03 13:15:33 +01:00
color: $color-white;
}
h1,
h2 {
margin: 0;
2015-11-03 13:15:33 +01:00
color: $color-white;
}
h1 {
padding: 0.2em 0;
2015-11-02 15:39:36 +01:00
&.icon:before {
width: 1em;
display: none;
margin-right: 0.4em;
2015-11-03 13:15:33 +01:00
font-size: 1.5em;
}
}
.col {
float: left;
margin-right: 2em;
}
.left {
float: left;
.hasform &:first-child {
padding-bottom: 0.5em;
float: none;
}
}
2015-11-03 13:15:33 +01:00
.right {
text-align: right;
float: right;
}
.search-form .icon {
@include svg-icon(1.3rem);
color: $nav-search-color;
position: absolute;
top: 0.3em;
left: 0.5em;
}
// For case where content below header should merge with it
&.merged {
margin-bottom: 0;
}
2015-11-03 13:15:33 +01:00
&.tab-merged {
padding-left: $desktop-nice-padding;
padding-right: $desktop-nice-padding;
2015-11-03 13:15:33 +01:00
.right:last-child {
padding-right: 0;
}
2015-11-03 13:15:33 +01:00
@include media-breakpoint-down(xs) {
.breadcrumb {
padding-left: calc(#{$desktop-nice-padding} - 8px);
}
}
@include media-breakpoint-up(sm) {
.breadcrumb {
margin-left: -$desktop-nice-padding;
margin-right: -$desktop-nice-padding;
padding-left: math.div($desktop-nice-padding, 2);
}
}
}
&.header-with-breadcrumb {
padding-top: 0;
.breadcrumb {
margin-bottom: 1rem;
padding-left: math.div(
$desktop-nice-padding,
2
); // rather than padding-left: revert;
}
}
2016-10-27 21:43:18 +02:00
&.tab-merged,
2021-12-21 12:13:08 +01:00
&.no-border {
border: 0;
@include media-breakpoint-down(xs) {
// To all hamburger menu to be visible
padding-left: 1.6em;
padding-right: 1.6em;
padding-top: 11px;
2021-12-21 12:13:08 +01:00
2015-11-02 15:39:36 +01:00
.nice-padding {
margin-left: -$desktop-nice-padding;
}
}
}
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
label {
@include visuallyhidden();
}
2015-11-03 13:15:33 +01:00
input[type='text'],
select {
border-width: 0;
&:focus {
background-color: $color-white;
}
}
.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-right: 2em;
}
.avatar.small {
margin-left: 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 {
padding-top: 1.5em;
padding-bottom: 1.5em;
.left {
float: left;
margin-right: 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
}
.header-title {
@include media-breakpoint-down(xs) {
padding-left: $mobile-nav-indent;
}
2020-06-07 20:30:39 +02:00
&-icon {
@include svg-icon();
margin-right: 0.5em;
}
}