/* HEADINGS and TYPOGRAPHY */ $body-font: MuseoSans, Helmet, Freesans, sans-serif !default; $meta-font: Helmet, Freesans, sans-serif !default; $heading-font: 'Museo300-display', MuseoSans, Helmet, Freesans, sans-serif !default; $menu-image: 'menu-white' !default; $link-color: #005ea5 !default; $link-hover-color: #2b8cc4 !default; $link-visited-color: $link-color !default; $link-text-decoration: none !default; $link-hover-text-decoration: underline !default; $itemlist_item_background: #f6f6f6 !default; $itemlist_item_background_hover: #e6e6e6 !default; $col_big_numbers: #666 !default; $col_fixed_label: #00BD08 !default; $col_fixed_label_light: mix($col_fixed_label, #fff, 10%) !default; $form-control-border-color: #aaaaaa !default; $header-top-border-width: 0.25em !default; $header-top-border: $header-top-border-width solid $primary !default; $container-max-width: 60em !default; @import "_mixins"; @import "_report_list"; body { font-family: $body-font; margin:0; font-size:1em; line-height:1.5; color: #222; background-color: #fff; } p { font-size: 1em; font-weight: normal; margin: 0 0 1em; } small{ font-family: $meta-font; font-style: italic; font-size: 0.8125em; line-height: 1.2307em; } h1 { font-family: $heading-font; font-size: 2em; line-height: 1em; font-weight: normal; margin-top: 0.5em; margin-bottom: 0.5em; // Useful for extra inline text after a heading small { display: inline-block; // break onto its own line if not enough horizontal space font-style: inherit; font-family: inherit; font-size: 0.5em; // back down to 1em from the 2em parent line-height: 1em; } } h1#reports_heading { margin-bottom: 0; } h2 { font-family: $heading-font; font-size: 1.5em; /*24px*/ line-height: 1.3333em; /*32px*/ font-weight: normal; margin-top: 1.333333333em; /*32px*/ margin-bottom: 0.666666666em; /*16px*/ } h3 { font-size: 1.25em; line-height: 1.20em; margin-top: 1.2em; margin-bottom: 0.8em; font-weight: normal; } h4 { font-size: 1em; font-weight: normal; margin-bottom: 1em; } // default list styles ul, ol { font-size: 1em; margin-bottom: 2em; margin-#{$left}: 2em; padding:0; } li{ margin-bottom: 0.5em; } ul li{ list-style: square; } ol li { list-style:decimal; } // lets you have a traditional ol but with nicely styled numbers // for older browsers it just falls back to the normal ol ol.big-numbers { padding: 0; margin: 0; counter-reset: li; // reset counter to be 'li' instead of a number > li { position: relative; list-style: none; padding: flip(0 0 0 2.5em, 0 2.5em 0 0); margin-bottom:2em; &:before { content: counter(li); // set the content to be whatever the 'li' var is counter-increment: li; // add to the counter var position: absolute; #{$left}: 0; top:-0.2em; color:$col_big_numbers; line-height:1; font-family: $meta-font; font-weight: bold; font-size: 2.5rem; } } } dl { margin: 0; padding: 0; dt { font-size: 1em; line-height: 1.5em; font-weight: bold; } dd { font-weight: 1em; line-height: 1.5em; margin: 0 0 1em; } } blockquote { p:before { content: '“'; } p:after { content: '”'; } } pre { font-family: monospace; } img { //do this otherwise IE will just not display //any img without a height defined height:auto; max-width: 100%; } // So that map popups display correctly #popup img { max-width: none; } select, input, textarea { font-size: 99%; } // To deal with bug from drop-down being wider than holder select { width: 100%; } a, .fake-link { text-decoration: $link-text-decoration; color: $link-color; &:visited { color: $link-visited-color; } &:hover, &:active { text-decoration: $link-hover-text-decoration; color: $link-hover-color; } } .fake-link { display: inline-block; background: transparent; border: none; font-family: inherit; font-size: 1em; padding: 0; margin: 0; } // custom type .small-print { @extend small; margin-bottom: 1.2307em; color:#666666; } .meta{ color:#555555; font-style: italic; margin-bottom: 0px; } .meta-2{ font-family: $meta-font; color:#666666; font-style: italic; font-size: 0.75em; } h4.static{ font-family: $meta-font; text-transform: uppercase; font-size: 0.875em; line-height: 1.71428em; color:#666; margin-top: 2em; } h4.static-with-rule{ @extend.static; background: #f6f6f6; border-top: 0.25em solid $primary; margin-bottom:0.25em; padding: 0.5em 1em; } /* FORMS */ input[type=file] { width: 100%; } input[type=tel], input[type=number], input[type=text], input[type=password], input[type=email], input[type=date], input[type=time], input[type=datetime], input[type=url], textarea { @include box-sizing(border-box); display: block; width: 100%; padding: 0.5em; font-size: 1em; line-height: 1em; } textarea { line-height: 1.5em; min-height: 5em; } label, legend, .label { display: block; margin-top: 1.25em; margin-bottom: 0.5em; font-weight: bold; &.inline { display: inline; padding: flip(0 1em 0 5px, 0 5px 0 1em); font-weight: normal; } &.inline-text { display: inline; font-weight: normal; } } .form-control { display: block; background-color: #fff; border: 1px solid $form-control-border-color; @include border-radius(4px); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2); font-family: inherit; // eg: stop Firefox and IE10-11 using Courier in textareas margin-bottom: 0.5em; &[readonly] { box-shadow: none; color: #888888; } } select.form-control { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); height: 2.2em; // roughly equal to default input height &[multiple] { height: auto; } // Prevent a flash of tall select elements // before $.multiSelect() has replaced them. .js &.js-multiple[multiple] { height: 2.2em; } } .form-group { position: relative; max-width: 27em; } // Handy for lining up "child" form groups below show/hide checkboxes. .form-group--indented { padding-left: 2em; } .form-check { margin-top: 1.5em; // match margin-top on regular labels padding-left: 2em; position: relative; & > input { position: absolute; top: 0.3em; left: 0.5em; } label { margin-top: 0.5em; } } .form-check--inline { margin: 0.5em 0; label { margin: 0; display: inline; } .form-hint { display: inline; &:before { content: "\2013"; margin: 0 0.3em 0 0.1em; } } } .required-text { position: absolute; #{$right}: 0; top: 0; } .required-text--optional { color: #666; } .form-section-heading { font-family: inherit; color: inherit; font-weight: bold; margin-bottom: 0.25em; } .form-section-heading--private { &:before { content: ""; display: inline-block; width: 16px; height: 18px; background-repeat: no-repeat; @include svg-background-image('/cobrands/fixmystreet/images/padlock'); background-size: 16px 18px; margin-#{$right}: 0.5em; } } .form-section-description { color: #666; line-height: 1em * (22/16); } .form-section-preview { // If social_auth_enabled, but no javascript, we want the "Next" preview // to be visible but without any other styling. Once javascript is enabled, // the "next"/"back" buttons will work, so we want the styling back. html.js & { background-color: #eee; border-radius: 4px; padding: 1em; .form-section-heading { margin: 0 0 0.5em 0; } } small { margin: 0.5em auto; display: block; text-align: center; font-style: normal; width: 75%; } } // Purposefully *not* wrapped in `html.js` because the margin-top helps // separate the social login buttons from the .description_tips list. .form-section-preview--next { margin-top: 1.5em; } /* On a reporting page MyW/anon */ small#or { margin: 1em auto; width: 100%; } small#or:before, small#or:after { background-color: #fff; content: ""; display: inline-block; height: 2px; position: relative; vertical-align: middle; width: 50%; } small#or:before { right: 1em; margin-left: -50%; } small#or:after { left: 1em; margin-right: -50%; } // grey background, full width box .form-box { margin: 0 -1em 0.25em; background: #eee; padding: 1em; & > input[type=text], & > input[type=email] { margin-bottom: 1em; } & > label:first-child { margin-top: 0; } .title { font-size: 1.25em; margin: 0.5em 0; } h2 { margin: 0 0 0.5em; } h3 { margin: 0 0 1em; font-size: 1.125em; font-weight: normal; strong { font-size: 2em; margin-#{$right}: 0.25em; } } } .change_location { color: #666; margin: 0 0 1em; // No need for this element on mobile, where they can't click the map, // and there's already a "Report" button in the header that leads to // the homepage search form. But we'll want to unhide in layout.scss. display: none; li { list-style: none; padding-#{$left}: 24px; margin: 0.3em 0 0 0; background-size: 14px 14px; background-repeat: no-repeat; background-position: flip(0 50%, 100% 50%); } } .change_location__map { @include svg-background-image('/cobrands/fixmystreet/images/change-location-arrow'); } .change_location__search { @include svg-background-image('/cobrands/fixmystreet/images/change-location-search'); } // Space between the .change_location list and any // top_message.html announcements inserted via ajax. #js-top-message > :first-child { margin-top: 1.5em; } .form-txt-submit-box { @include clearfix(); @include flex-container(); @include flex-wrap(wrap); input[type=password], input[type=tel], input[type=number], input[type=text], input[type=email], select { width: auto; max-width: none; @include flex(72 0 auto); } input[type=submit] { @include flex(28 0 auto); margin: 0 0.25em 0.5em; padding-top: 0.6em; padding-bottom: 0.5em; } } .checkbox-group { margin:1em 0; } .label-containing-checkbox { padding-#{$left}: 24px; position: relative; margin-bottom: 0; input { position: absolute; #{$left}: 0; top: 0.2em; } } // form errors div.form-error, p.form-error { @include inline-block; background:#ff0000; color:#fff; padding:0 0.5em; @include border-radius(0.25em 0.25em 0 0); a { color: white; text-decoration: underline; } a:hover { text-decoration: none; } } input.form-error, textarea.form-error { border-color:#ff0000; @include border-radius(0 0.25em 0.25em 0.25em); } .form-error__box { border: solid 2px #ff0000; padding: 0.5em; margin-bottom: 0.5em; } ul.error { background:#ff0000; color:#fff; padding:0 0.5em; @include border-radius(0.25em); } .form-success { background: #009900; color: #fff; padding: 0 0.5em; @include border-radius(0.25em); } .duplicate-report-suggestions { position: relative; .item-list__item--expandable { border-top: 1px solid #ddd; } .item-list { margin: 0 -1em 1em -1em; border-bottom: 1px solid #ddd; } } .duplicate-report-suggestions__close { position: absolute; right: 0; top: 0; display: block; width: 32px; height: 0; padding-top: 32px; overflow: hidden; border: none; background: transparent; opacity: 0.5; line-height: 2em; // Make sure line box is taller than text, so text is pushed below hidden overflow. &:hover, &:focus { opacity: 0.7; } // Doing some gymnastics so we can reuse the existing .btn--close icon. &:before { content: ""; display: block; width: 16px; height: 16px; position: absolute; top: 8px; left: 8px; background-repeat: no-repeat; background-size: 112px 16px; @include svg-background-image('/cobrands/fixmystreet/images/button-icons'); background-position: -32px 0; } } /*** LAYOUT ***/ .dev-site-notice { font-size: 1.5em; color: #fff; background-color: #f00; position: absolute; padding: 1em 5em; top: 1em; left: -5em; transform: rotate(-45deg); z-index: 2; pointer-events: none; } // Padding creates page margins on mobile .container { margin: 0 auto; padding: 0 1em; max-width: $container-max-width; } // Use full width to reverse .container margins .full-width { margin: 0 -1em; } // #site-header creates grey bar in mobile #site-header { @if ($header-top-border) { border-top: $header-top-border; } color: $nav_colour; background-color: $nav_background_colour; position: relative; } #site-logo { display: block; width: 175px; height: 60px; background-position: 0 50%; background-repeat: no-repeat; background-size: 175px 35px; @include svg-background-image("/cobrands/fixmystreet/images/site-logo"); text-indent: -999999px; } // this is a skip to nav for mobile users only #nav-link { width: 3em; height: 0; padding-top: 3em; overflow: hidden; background: transparent url(../fixmystreet/images/#{$menu-image}.png) center center no-repeat; background-image: inline-image("../fixmystreet/images/#{$menu-image}.svg"), none; background-size: 22px 18px; #{$right}: 0; } #nav-link, #report-cta { display: block; position: absolute; top: 50%; transform: translateY(-50%); } // A shortcut to the Reporting page, in the mobile header #report-cta { #{$right}: 3.5em; font-size: 0.9em; line-height: 1em; border: 1px solid #666; color: $nav_colour; padding: 0.4em; border-radius: 0.3em; &:hover, &:focus { text-decoration: none; background-color: $nav_hover_background_colour; } } // The nav list has this sort of "full width" look, // so we want to cancel out the margin from .container #main-nav { margin: 0 -1em; } .nav-menu { @include list-reset-soft; a, span { display: block; padding: 0.5em 1em; background-color: #f6f6f6; color: #333; font-size: 1.25em; border-bottom: 0.25em solid #333; } a:visited { color: #333; } a:hover { background-color: #333; color: #fff; text-decoration: none; } span { background-color: #ccc; } span.report-a-problem-btn { cursor: pointer; } span.report-a-problem-btn:hover { background-color: #333; color: #fff; text-decoration: none; } } .shadow-wrap { margin: 0 -1em; } #key-tools { @include list-reset-soft; margin-bottom: 1em; display: table; width: 100%; li { display: table-cell; vertical-align: bottom; text-align: center; border-#{$right}: 0.25em solid #fff; &:last-child { border-#{$right}: none; } } button { width: 100%; border: none; } a, button { display: block; background-color: #f5f5f5; background-repeat: no-repeat; color: #333 !important; padding: 1em; text-transform: uppercase; font-size: 0.6875em; font-family: $meta-font; font-weight: normal; line-height: 1.2em; white-space: normal; border-radius: 0; &:hover, &.hover { text-decoration:none; background-color:#333; color: #fff !important; } &:after { content: ""; display: inline-block; width: 16px; height: 16px; margin-#{$left}: 0.5em; vertical-align: -0.25em; background-size: 112px 16px; background-repeat: no-repeat; @include svg-background-image('/cobrands/fixmystreet/images/report-tools'); } &.abuse:after { background-position: -96px 0; } &.feed:after { background-position: -64px 0; } &.share:after { background-position: -80px 0; } &.chevron:after { background-position: flip(-16px 0, 0 0); } } } #report-updates-data { img { float: $right; } // Avoid double margin between opening paragraph and label. label { margin-top: 0; } } #report-share { .btn { padding-#{$left}: 1.5em; padding-#{$right}: 1.5em; display: inline-block; } .btn + .btn { margin-#{$left}: 1em; } } //footer blocks footer { margin-top: 1em; } #footer-mobileapps { margin: 0 -1em; padding: 1em 1em 0; h4 { margin:0; } p { font-size: 0.75em; padding-bottom: 0; } } #footer-help { ul { @include list-reset-soft; li { border-bottom:1px solid #AFAFAF; &:last-child { border-bottom:none; } h4 { margin:0.75em 0 0.25em; } p { font-size:0.75em; margin-bottom: 0; } } } } /*BUTTONS*/ .btn { @include button-reset(); } // Deprecated // Try to use `btn btn--primary` etc instead of `btn-primary` where possible. .btn-primary, .green-btn, .btn-danger, .red-btn { @include button-size(); } .btn + .btn { // Ensure extra space between inline buttons placed next to each other. margin-#{$left}: 0.5em; } .btn-primary, .green-btn, .btn--primary { @include button-variant(#9FDE23, #7FB900, #5B9700, #fff, #9FDE23, #7FB900, #5B9700, #fff); } .btn-danger, .red-btn, .btn--danger { @include button-variant(#FF0038, #BF002A, #80001C, #fff, #FF0038, #BF002A, #80001C, #fff); } .final-submit, input.final-submit { margin: 1em 0.5em; float: $right; } .btn--facebook { @include button-variant(#3b5998, darken(#3b5998, 10%), #3b5998, #fff, darken(#3b5998, 5%), darken(#3b5998, 10%), #3b5998, #fff); img { margin-#{$right}: 0.5em; vertical-align: -0.2em; height: 1.3em; width: auto; } } .btn--twitter { @include button-variant(#55acee, darken(#55acee, 10%), #55acee, #fff, darken(#55acee, 5%), darken(#55acee, 10%), #55acee, #fff); img { margin-#{$right}: 0.5em; vertical-align: -0.2em; height: 1.3em; width: auto; } } .btn--back, .btn--forward, .btn--cancel, .btn--navigate, .btn--geolocate, .btn--shortlist, .btn--shortlisted { &:before { content: ""; display: inline-block; width: 16px; height: 16px; background-repeat: no-repeat; background-size: 112px 16px; @include svg-background-image('/cobrands/fixmystreet/images/button-icons'); margin-#{$right}: 0.5em; vertical-align: -0.1em; // vertically centre icon in button } } .btn--back { &:before { background-position: flip(0 0, -16px 0); } } .btn--forward { &:before { background-position: flip(-16px 0, 0 0); } } .btn--cancel { &:before { background-position: -32px 0; } } .btn--navigate { &:before { background-position: -80px 0; } } .btn--geolocate { &:before { background-position: -96px 0; } } .btn--shortlist { &:before { background-position: -64px 0; } } .btn--shortlisted { &:before { background-position: -48px 0; } } .btn--provide-update { display: block; width: 100%; margin-bottom: 1em; } .btn--block { display: block; // Need to force 100% width if this is applied to