From 3c35689de5b7625bc1c85fce087c0c7ceaa9b04f Mon Sep 17 00:00:00 2001 From: "ben.freshwater" Date: Thu, 28 Nov 2024 12:46:25 +0000 Subject: [PATCH] chore: lint sass --- components/o-header-services/main.scss | 50 ++++---- components/o-layout/main.scss | 152 ++++++++++++------------ components/o-overlay/main.scss | 34 +++--- components/o-social-follow/main.scss | 48 ++++---- components/o-stepped-progress/main.scss | 6 +- components/o-subs-card/main.scss | 32 ++--- 6 files changed, 161 insertions(+), 161 deletions(-) diff --git a/components/o-header-services/main.scss b/components/o-header-services/main.scss index 3d5e10074b..56c2ef4989 100644 --- a/components/o-header-services/main.scss +++ b/components/o-header-services/main.scss @@ -59,40 +59,40 @@ 'M' ); - $bleed: index($features, 'bleed'); - $drop-down: index($features, 'drop-down'); + $bleed: index($features, 'bleed'); + $drop-down: index($features, 'drop-down'); - /// Base styles for a header - @include _oHeaderServicesBase($bleed); + /// Base styles for a header + @include _oHeaderServicesBase($bleed); - /// Required because there would be no header without the title - /// if other features aren't added. - @include _oHeaderServicesTop($logo, $drawer-breakpoint); + /// Required because there would be no header without the title + /// if other features aren't added. + @include _oHeaderServicesTop($logo, $drawer-breakpoint); - @if index($types, 'primary-nav') { - @include _oHeaderServicesPrimaryNav($drawer-breakpoint, $drop-down); - } + @if index($types, 'primary-nav') { + @include _oHeaderServicesPrimaryNav($drawer-breakpoint, $drop-down); + } - @if index($types, 'secondary-nav') { - @include _oHeaderServicesSecondaryNav($drawer-breakpoint); - } + @if index($types, 'secondary-nav') { + @include _oHeaderServicesSecondaryNav($drawer-breakpoint); + } - @if index($types, 'b2b') and _oHeaderSupports('b2b') { - @include _oHeaderServicesTheme($theme: 'b2b'); - } + @if index($types, 'b2b') and _oHeaderSupports('b2b') { + @include _oHeaderServicesTheme($theme: 'b2b'); + } - @if index($types, 'b2c') and _oHeaderSupports('b2b') { - @include _oHeaderServicesTheme($theme: 'b2c'); - } + @if index($types, 'b2c') and _oHeaderSupports('b2b') { + @include _oHeaderServicesTheme($theme: 'b2c'); + } - @if $drop-down { - @include _oHeaderServicesDropDown(); - } + @if $drop-down { + @include _oHeaderServicesDropDown(); + } } @if $o-header-services-is-silent == false { - @include oHeaderServices(); + @include oHeaderServices(); - // Set to silent again to avoid being output twice - $o-header-services-is-silent: true !global; + // Set to silent again to avoid being output twice + $o-header-services-is-silent: true !global; } diff --git a/components/o-layout/main.scss b/components/o-layout/main.scss index e5b5d5e720..01b0598432 100644 --- a/components/o-layout/main.scss +++ b/components/o-layout/main.scss @@ -14,22 +14,22 @@ /// @param {Map} $opts - A map of configuration, with "layouts" ('documentation', 'landing', 'query', 'bleed'); "features" ('linked-headings', 'typography'); "hero-image" (an image for the background of the "hero" area); and `fonts` to customise whether font faces are output. @mixin oLayout( - $opts: ( - 'layouts': ( - 'documentation', - 'landing', - 'query', - 'bleed', - ), - 'features': ( - 'sidebar-nav', - 'sticky-sidebar-container', - 'linked-headings', - 'typography', - ), - 'hero-image': '', - 'fonts': true, - ) + $opts: ( + 'layouts': ( + 'documentation', + 'landing', + 'query', + 'bleed', + ), + 'features': ( + 'sidebar-nav', + 'sticky-sidebar-container', + 'linked-headings', + 'typography', + ), + 'hero-image': '', + 'fonts': true, + ) ) { @include oPrivateFoundation(); @@ -43,76 +43,76 @@ $bleed-layout: index($layouts, 'bleed') and _oLayoutSupports('bleed'); $docs-layout: index($layouts, 'documentation') and _oLayoutSupports('documentation'); - $landing-layout: index($layouts, 'landing') and _oLayoutSupports('landing'); - $query-layout: index($layouts, 'query') and _oLayoutSupports('query'); - $hero-image: map-get($opts, $key: 'hero-image'); + $landing-layout: index($layouts, 'landing') and _oLayoutSupports('landing'); + $query-layout: index($layouts, 'query') and _oLayoutSupports('query'); + $hero-image: map-get($opts, $key: 'hero-image'); - // Base styles. - @include _oLayoutBase(); + // Base styles. + @include _oLayoutBase(); - // Typography. - @if ($typography) { - // By default fonts are output when typography is enabled. - @if ($fonts != false) { - @include oFonts(); - } - @include _oLayoutTypography; - } - @if ($linked-headings) { - @include _oLayoutLinkedHeading(); - } + // Typography. + @if ($typography) { + // By default fonts are output when typography is enabled. + @if ($fonts != false) { + @include oFonts(); + } + @include _oLayoutTypography; + } + @if ($linked-headings) { + @include _oLayoutLinkedHeading(); + } - // Shared layout areas. - @include _oLayoutAreaHeader(); - @include _oLayoutAreaMain(); - @include _oLayoutAreaFooter(); + // Shared layout areas. + @include _oLayoutAreaHeader(); + @include _oLayoutAreaMain(); + @include _oLayoutAreaFooter(); - // Always include the sidebar nav for the documentation layout. - @if ($docs-layout or $nav) { - @include _oLayoutNavigation($query-layout); - } + // Always include the sidebar nav for the documentation layout. + @if ($docs-layout or $nav) { + @include _oLayoutNavigation($query-layout); + } - // Layouts. - @if ($bleed-layout) { - @include _oLayoutBleed(); - } + // Layouts. + @if ($bleed-layout) { + @include _oLayoutBleed(); + } - @if ($docs-layout) { - @include _oLayoutDocsGrid(); - // Documentation page areas. - @include _oLayoutAreaSidebar(); - } + @if ($docs-layout) { + @include _oLayoutDocsGrid(); + // Documentation page areas. + @include _oLayoutAreaSidebar(); + } - @if ($landing-layout) { - @include _oLayoutLandingGrid(); - // Landing page areas. - @include _oLayoutAreaHero($hero-image); - @include _oLayoutAreaOverview(); - @include _oLayoutAreaListing(); - } + @if ($landing-layout) { + @include _oLayoutLandingGrid(); + // Landing page areas. + @include _oLayoutAreaHero($hero-image); + @include _oLayoutAreaOverview(); + @include _oLayoutAreaListing(); + } - @if ($query-layout) { - @include _oLayoutQueryGrid(); - // Query page areas. - @include _oLayoutAreaHeading(); - @include _oLayoutAreaQuerySidebar(); - @include _oLayoutAreaAsideSidebar(); - } + @if ($query-layout) { + @include _oLayoutQueryGrid(); + // Query page areas. + @include _oLayoutAreaHeading(); + @include _oLayoutAreaQuerySidebar(); + @include _oLayoutAreaAsideSidebar(); + } - @if ($sticky-sidebar-container) { - // @breaking - Remove `.sticky-sidebar-container` class - // as it is not specification compliant, class names - // must be prefixed with the component name. - .sticky-sidebar-container, - .o-layout-sticky-sidebar-container { - position: sticky; - top: oPrivateSpacingByName('s3'); - } - } + @if ($sticky-sidebar-container) { + // @breaking - Remove `.sticky-sidebar-container` class + // as it is not specification compliant, class names + // must be prefixed with the component name. + .sticky-sidebar-container, + .o-layout-sticky-sidebar-container { + position: sticky; + top: oPrivateSpacingByName('s3'); + } + } } @if $o-layout-is-silent == false { - @include oLayout(); - // Set to silent again to avoid being output twice - $o-layout-is-silent: true !global; + @include oLayout(); + // Set to silent again to avoid being output twice + $o-layout-is-silent: true !global; } diff --git a/components/o-overlay/main.scss b/components/o-overlay/main.scss index b9255df014..043c13ff22 100644 --- a/components/o-overlay/main.scss +++ b/components/o-overlay/main.scss @@ -36,29 +36,29 @@ $variants: map-get($opts, 'variants'); - // Include base styles - @include _oOverlayBase(); + // Include base styles + @include _oOverlayBase(); - // Include the shaded heading variant - @if index($variants, 'heading-shaded') { - @include _oOverlayHeadingShaded(); - } + // Include the shaded heading variant + @if index($variants, 'heading-shaded') { + @include _oOverlayHeadingShaded(); + } - // Include the compact variant - @if index($variants, 'compact') { - @include _oOverlayCompact(); - } + // Include the compact variant + @if index($variants, 'compact') { + @include _oOverlayCompact(); + } - // Include the full-screen variant - @if index($variants, 'full-screen') { - @include _oOverlayFullScreen(); - } + // Include the full-screen variant + @if index($variants, 'full-screen') { + @include _oOverlayFullScreen(); + } } // If silent mode is disabled, output all of the default overlay styles. @if ($o-overlay-is-silent == false) { - @include oOverlay(); + @include oOverlay(); - // Set module to silent again - $o-overlay-is-silent: true !global; + // Set module to silent again + $o-overlay-is-silent: true !global; } diff --git a/components/o-social-follow/main.scss b/components/o-social-follow/main.scss index 6e5bea5d2a..e0f4f6951b 100644 --- a/components/o-social-follow/main.scss +++ b/components/o-social-follow/main.scss @@ -48,14 +48,14 @@ @error 'A global "$system-code" Sass variable must be set to a valid [Bizops system code](https://biz-ops.in.ft.com/list/Systems).'; } - .o-social-follow { - display: flex; - flex-wrap: wrap; - gap: oPrivateSpacingByName('s4'); - margin: 0; - padding: 0; - list-style: none; - } + .o-social-follow { + display: flex; + flex-wrap: wrap; + gap: oPrivateSpacingByName('s4'); + margin: 0; + padding: 0; + list-style: none; + } .o-social-follow-icon { --o-social-follow-icon-color: black; @@ -74,21 +74,21 @@ background-color: var(--o-social-follow-icon-color); } - &:hover, - &:focus { - --o-social-follow-icon-color: white; - } + &:hover, + &:focus { + --o-social-follow-icon-color: white; + } @include oPrivateNormaliseFocusApply() { @include oPrivateNormaliseFocusContent(); } } - @if $standalone { - .o-social-follow-icon--standalone { - border-color: transparent; - } - } + @if $standalone { + .o-social-follow-icon--standalone { + border-color: transparent; + } + } @if index($themes, 'inverse') { .o-social-follow-icon--inverse { @@ -112,13 +112,13 @@ mask-image: url($icon-image-url); } - &:hover, - &:focus { - background-color: $social-brand-colour; - border-color: var(--o-social-follow-brand-color); - } - } - } + &:hover, + &:focus { + background-color: $social-brand-colour; + border-color: var(--o-social-follow-brand-color); + } + } + } .o-social-follow-icon__label { @include oPrivateNormaliseVisuallyHidden(); diff --git a/components/o-stepped-progress/main.scss b/components/o-stepped-progress/main.scss index 96129c3bd0..0ff8916bbb 100644 --- a/components/o-stepped-progress/main.scss +++ b/components/o-stepped-progress/main.scss @@ -10,8 +10,8 @@ @import 'src/scss/mixins'; @if ($o-stepped-progress-is-silent == false) { - @include oSteppedProgress(); + @include oSteppedProgress(); - // Set to silent again to avoid being output twice - $o-stepped-progress-is-silent: true !global; + // Set to silent again to avoid being output twice + $o-stepped-progress-is-silent: true !global; } diff --git a/components/o-subs-card/main.scss b/components/o-subs-card/main.scss index 4d7036d4db..9066f7ed3b 100644 --- a/components/o-subs-card/main.scss +++ b/components/o-subs-card/main.scss @@ -31,24 +31,24 @@ $o-subs-card-is-silent: true !default; $b2b-theme-enabled: index($themes, "b2b"); $discount-theme-enabled: index($themes, "discount"); - .o-subs-card { - @include oSubsCardBase; - } + .o-subs-card { + @include oSubsCardBase; + } - @if $b2b-theme-enabled { - .o-subs-card--b2b { - @include oSubsCardB2B; - } - } - @if $discount-theme-enabled { - .o-subs-card--discount { - @include oSubsCardDiscount; - } - } + @if $b2b-theme-enabled { + .o-subs-card--b2b { + @include oSubsCardB2B; + } + } + @if $discount-theme-enabled { + .o-subs-card--discount { + @include oSubsCardDiscount; + } + } } @if ($o-subs-card-is-silent == false) { - @include oSubsCard(); - // Set to silent again to avoid being output twice - $o-subs-card-is-silent: true !global; + @include oSubsCard(); + // Set to silent again to avoid being output twice + $o-subs-card-is-silent: true !global; }