Skip to content

Commit

Permalink
chore: lint sass
Browse files Browse the repository at this point in the history
  • Loading branch information
frshwtr committed Nov 28, 2024
1 parent a5c0026 commit 3c35689
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 161 deletions.
50 changes: 25 additions & 25 deletions components/o-header-services/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
152 changes: 76 additions & 76 deletions components/o-layout/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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;
}
34 changes: 17 additions & 17 deletions components/o-overlay/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
48 changes: 24 additions & 24 deletions components/o-social-follow/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 {
Expand All @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions components/o-stepped-progress/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Loading

0 comments on commit 3c35689

Please sign in to comment.