From 5ae96f97c34c9e3c142cff4d7d2122675a816904 Mon Sep 17 00:00:00 2001 From: Aziz <119948730+aziz-access@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:45:53 +0100 Subject: [PATCH] fix(search-bar): adjust the density Co-authored-by: Alexandre Caron --- src/app/pages/portal/portal.component.scss | 1 + src/style/igo2-lib.override.scss | 24 ++++++++++++++++++++++ src/style/theme.scss | 2 ++ 3 files changed, 27 insertions(+) create mode 100644 src/style/igo2-lib.override.scss diff --git a/src/app/pages/portal/portal.component.scss b/src/app/pages/portal/portal.component.scss index f52bb9cd6..a4916fb64 100644 --- a/src/app/pages/portal/portal.component.scss +++ b/src/app/pages/portal/portal.component.scss @@ -16,6 +16,7 @@ left: $navbarSpacer; top: $navbarSpacer; display: flex; + align-items: center; width: $search-bar-width; max-width: $search-bar-width; z-index: 4; diff --git a/src/style/igo2-lib.override.scss b/src/style/igo2-lib.override.scss new file mode 100644 index 000000000..7dfe3ba60 --- /dev/null +++ b/src/style/igo2-lib.override.scss @@ -0,0 +1,24 @@ +@use 'sass:map'; +@use '@angular/material' as mat; +@use '@igo2/geo' as igo2-geo; + +@mixin theme($theme) { + @include color($theme); + @include density($theme); +} + +@mixin color($theme) { +} + +@mixin density($theme) { + $density: mat.get-density-config($theme); + + $theme: map.merge( + $theme, + ( + density: $density - 2 + ) + ); + + @include igo2-geo.search-bar-density($theme); +} diff --git a/src/style/theme.scss b/src/style/theme.scss index bb709f59e..12845bbc9 100644 --- a/src/style/theme.scss +++ b/src/style/theme.scss @@ -1,5 +1,6 @@ @use '@angular/material' as mat; @use '../app/app.theme' as app; +@use './igo2-lib.override' as igo2-lib; /* * Define a default theme for styling some part of the app @@ -21,3 +22,4 @@ $theme: mat.define-light-theme( ); @include app.themes($theme); +@include igo2-lib.theme($theme);