Skip to content

Commit

Permalink
EWPP-4045: Replace blue ecl color class and fix font-family.
Browse files Browse the repository at this point in the history
  • Loading branch information
22Alexandra committed Feb 20, 2024
1 parent 51cd0c1 commit ce08054
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
3 changes: 2 additions & 1 deletion sass/components/_contextual_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

$outline-width: 3px !default;
$border_right: 1px solid var(--ecl-color-neutral-60) !default;
$font-family: null !default;

.ecl-contextual-navigation {
display: flex;
Expand Down Expand Up @@ -65,7 +66,7 @@ $border_right: 1px solid var(--ecl-color-neutral-60) !default;
color: var(--ecl-color-primary);
line-height: 1;
padding: 0;
font-family: arial, sans-serif;
font-family: $font-family;

&:hover {
color: var(--ecl-color-dark-100);
Expand Down
4 changes: 3 additions & 1 deletion sass/components/_global.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Apply global css.

$font-family: null !default;

body {
font-family: arial, sans-serif;
font-family: $font-family;
margin: 0;
padding: 0;
}
Expand Down
9 changes: 7 additions & 2 deletions sass/style-ec.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:map";
@use '@ecl/theme-ec';
@use '@ecl/theme-ec/theme';
@use '@ecl/vanilla-layout-grid/mixins/breakpoints' with (
Expand All @@ -17,7 +18,11 @@
@use "./components/form";
@use "./components/toolbar";
@use "./components/wysiwyg";
@use "./components/global";
@use "./components/global" with (
$font-family: map.get(theme.$theme, 'font-family', 'default'),
);
@use "./components/description_list";
@use "./components/media_iframe";
@use "./components/contextual_navigation";
@use "./components/contextual_navigation" with (
$font-family: map.get(theme.$theme, 'font-family', 'default'),
);
5 changes: 4 additions & 1 deletion sass/style-eu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
@use "./components/form";
@use "./components/toolbar";
@use "./components/wysiwyg";
@use "./components/global";
@use "./components/global" with (
$font-family: map.get(theme.$theme, 'font-family', 'default'),
);
@use "./components/description_list" with (
$background-color: var(--ecl-color-primary-5),
$border-color: var(--ecl-color-primary-10),
Expand All @@ -25,4 +27,5 @@
@use "./components/contextual_navigation" with (
$outline-width: 2px,
$border_right: 1px solid var(--ecl-color-dark-60),
$font-family: map.get(theme.$theme, 'font-family', 'default'),
);
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<ul style="grid-auto-flow: column; grid-template-rows: repeat(4, 1fr)" class="ecl-u-d-block ecl-u-d-m-grid ecl-unordered-list ecl-unordered-list--no-marker ecl-u-mt-xs ecl-u-type-m">
{% for language in languages %}
<li class="ecl-unordered-list__item ecl-u-ma-2xs">
{% set link_classes = language.current ? 'ecl-u-bg-blue-50 ecl-u-type-color-white ecl-u-type-bold' : '' %}
{% set link_classes = language.current ? 'ecl-u-bg-primary-40 ecl-u-type-color-white ecl-u-type-bold' : '' %}
{% include '@ecl-twig/link' with {
link: {
label: language.label,
Expand Down
4 changes: 2 additions & 2 deletions tests/src/Kernel/ContentLanguageSwitcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ protected function assertUnavailableLanguage(Crawler $crawler, string $expected)
* The label of the language.
*/
protected function assertSelectedLanguage(Crawler $crawler, string $expected): void {
$actual = $crawler->filter('div.ecl-lang-select-page div.ecl-container div.ecl-expandable__content li.ecl-unordered-list__item a.ecl-u-bg-blue-50')->text();
$actual = $crawler->filter('div.ecl-lang-select-page div.ecl-container div.ecl-expandable__content li.ecl-unordered-list__item a.ecl-u-bg-primary-40')->text();
$this->assertEquals($expected, trim($actual));
}

Expand All @@ -142,7 +142,7 @@ protected function assertSelectedLanguage(Crawler $crawler, string $expected): v
* The labels of the translations that should be rendered as links.
*/
protected function assertTranslationLinks(Crawler $crawler, array $expected): void {
$elements = $crawler->filter('div.ecl-lang-select-page div.ecl-container div.ecl-expandable__content li.ecl-unordered-list__item a:not(.ecl-u-bg-blue-50)');
$elements = $crawler->filter('div.ecl-lang-select-page div.ecl-container div.ecl-expandable__content li.ecl-unordered-list__item a:not(.ecl-u-bg-primary-40)');
$this->assertSameSize($expected, $elements);

$actual = array_column(iterator_to_array($elements), 'nodeValue');
Expand Down

0 comments on commit ce08054

Please sign in to comment.