Skip to content

Commit

Permalink
Issue #17: Updated the "Federal Header" library override (s)css sty…
Browse files Browse the repository at this point in the history
…les since Sass Framework update
  • Loading branch information
Sébastien Millart committed Jan 18, 2024
1 parent 361d9b7 commit 7171329
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 21 additions & 11 deletions scss/components/openfed_federalheader/federalheader-block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
// Visual styles for the "Openfed FederalHeader" block.
//

// Import Sass variables, functions, mixins and placeholders.
@import '../../config/imports';
// Load required `Framework SASS` modules.
@use '../../config/variable-overrides';
@use '../../../_sass-framework/helpers/units';
@use '../../../_sass-framework/layout/breakpoint';

// The following comment starts with a "!". So it will not be removed during
// the (SASS) compilation. It is just to alert project contributors that the
// (CSS) output file can not be modified under any circumstances.
/*! Compiled SASS file | Do NOT modify from here !*/

// This document follows Drupal CSS coding standards, Sass Guidelines
// and Sass Style Guide. Read more about these topics:
Expand All @@ -19,11 +26,14 @@

// Markup generated by federalheader-block.html.twig.
//
#{$blocks} {
.block {

// Block name: "Federal header" (Federal Header).
//
&--openfed-federalheader {
--federalheader-block-link-margin-right: var(--margin-small);
--federalheader-block-logo-width: #{units.rem(37px)};
--federalheader-block-logo-height: #{units.rem(30px)};

// Federal header (Link)
//
Expand All @@ -33,25 +43,25 @@
// Responsiveness
// Properties for at least small devices (Landscape phones, 576px and up).
//
@include breakpoint-up('small') {
@include rem('margin-right', map-get($component-margins, 'small'));
@include breakpoint.up('small') {
display: inline-block;
vertical-align: text-bottom;
margin-right: var(--federalheader-block-link-margin-right);
vertical-align: middle;
}
}

// Federal header (Link)
//
&__logo {
@include rem('width', 37px);
@include rem('height', 30px);
display: inline-block;
width: var(--federalheader-block-logo-width);
height: var(--federalheader-block-logo-height);

// Responsiveness
// Properties for at least small devices (Landscape phones, 576px and up).
//
@include breakpoint-up('small') {
vertical-align: text-bottom;
@include breakpoint.up('small') {
vertical-align: middle;
}
}
}
Expand Down

0 comments on commit 7171329

Please sign in to comment.