Skip to content

Commit

Permalink
move themes the the end of the file
Browse files Browse the repository at this point in the history
- add comment for hardcoded color
  • Loading branch information
petermakowski authored and bartaz committed Aug 24, 2022
1 parent 0cc8eab commit ea44c39
Showing 1 changed file with 31 additions and 30 deletions.
61 changes: 31 additions & 30 deletions scss/_patterns_side-navigation-expandable.scss
Original file line number Diff line number Diff line change
@@ -1,35 +1,5 @@
@import 'settings';

@mixin vf-side-navigation-expandable-theme($color-sidenav-text-active, $color-sidenav-item-background-hover, $color-sidenav-toggle-icon) {
.p-side-navigation__expand {
background-color: inherit;
&::before {
@include vf-icon-chevron($color-sidenav-toggle-icon);
}

&:hover {
background: $color-sidenav-item-background-hover;
color: $color-sidenav-text-active;
}
}
}

@mixin vf-side-navigation-expandable-theme-light {
@include vf-side-navigation-expandable-theme(
$color-sidenav-text-active: $colors--light-theme--text-default,
$color-sidenav-item-background-hover: $colors--light-theme--background-hover,
$color-sidenav-toggle-icon: $colors--light-theme--text-inactive
);
}

@mixin vf-side-navigation-expandable-theme-dark {
@include vf-side-navigation-expandable-theme(
$color-sidenav-text-active: $colors--dark-theme--text-default,
$color-sidenav-item-background-hover: $colors--dark-theme--background-hover,
$color-sidenav-toggle-icon: #999
);
}

@mixin vf-p-side-navigation-expandable {
.p-side-navigation__item,
.p-side-navigation__item--title {
Expand Down Expand Up @@ -110,3 +80,34 @@
}
}
}

@mixin vf-side-navigation-expandable-theme($color-sidenav-text-active, $color-sidenav-item-background-hover, $color-sidenav-toggle-icon) {
.p-side-navigation__expand {
background-color: inherit;
&::before {
@include vf-icon-chevron($color-sidenav-toggle-icon);
}

&:hover {
background: $color-sidenav-item-background-hover;
color: $color-sidenav-text-active;
}
}
}

@mixin vf-side-navigation-expandable-theme-light {
@include vf-side-navigation-expandable-theme(
$color-sidenav-text-active: $colors--light-theme--text-default,
$color-sidenav-item-background-hover: $colors--light-theme--background-hover,
$color-sidenav-toggle-icon: $colors--light-theme--text-inactive
);
}

@mixin vf-side-navigation-expandable-theme-dark {
@include vf-side-navigation-expandable-theme(
$color-sidenav-text-active: $colors--dark-theme--text-default,
$color-sidenav-item-background-hover: $colors--dark-theme--background-hover,
// color of toggle icon - needed because of lack of rgba support in icon mixin
$color-sidenav-toggle-icon: #999
);
}

0 comments on commit ea44c39

Please sign in to comment.