Skip to content

Commit

Permalink
fix(geo): layer - visibility button style regression (#1456)
Browse files Browse the repository at this point in the history
* fix(geo): layer - visibility button style regression

* fix(geo): layer adjust style

* fix(geo): layer - style adjustment
  • Loading branch information
alecarn authored Oct 20, 2023
1 parent d500cbb commit 9221c04
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
}

mat-icon {
&.disabled {
color: rgba(0, 0, 0, 0.38);
}

&[matBadge] ::ng-deep .mat-badge-content {
font-size: 12px;
}
Expand Down
33 changes: 33 additions & 0 deletions packages/geo/src/lib/layer/layer-item/layer-item.theme.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@use 'sass:map';
@use '@angular/material' as mat;

@mixin theme($theme) {
@include color($theme);
}

@mixin color($theme) {
$foreground: map.get($theme, foreground);
$primary: map.get($theme, primary);
$accent: map.get($theme, accent);

igo-layer-item {
&.igo-layer-item-focused > mat-list-item {
background-color: mat.get-color-from-palette($accent, lighter);
color: mat.get-color-from-palette($primary, default-contrast);
}

button {
&:not(.mat-primary) {
mat-icon {
color: mat.get-color-from-palette($foreground, base);
}
}

mat-icon {
&.disabled {
color: mat.get-color-from-palette($foreground, disabled);
}
}
}
}
}
11 changes: 2 additions & 9 deletions packages/geo/src/lib/layer/layer.theming.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
@use 'sass:map';
@use '@angular/material' as mat;
@use './layer-legend/layer-legend.theming.scss' as layer-legend;
@use './layer-list-tool/layer-list-tool.theming.scss' as layer-list-tool;
@use './layer-item/layer-item.theme.scss' as layer-item;

@mixin igo-layer-theming($theme) {
$primary: map.get($theme, primary);
$accent: map.get($theme, accent);

@include layer-legend.igo-layer-legend-theming($theme);
@include layer-list-tool.theme($theme);

igo-layer-item.igo-layer-item-focused > mat-list-item {
background-color: mat.get-color-from-palette($accent, lighter);
color: mat.get-color-from-palette($primary, default-contrast);
}
@include layer-item.theme($theme);
}

0 comments on commit 9221c04

Please sign in to comment.