Darken() in _global.scss does not work


Using a mixin to darken colors in file _global.scss like this

@mixin colorize($color) {
  background-color: $color;

  &:hover {
    background-color: darken($color, 15%);

li.menu-item.light {
  @include colorize(#{map-get($theme-colors, "main-menu-background-light")});

  text-decoration: none;

rises the following error:

Module build failed: 
    background-color: darken($color, 15%);
      Argument `$color` of `darken($color, $amount)` must be a color
      in /Applications/MAMP/htdocs/id_wp_test/wp-content/themes/idweblogs-portal/resources/assets/styles/common/_global.scss (line 290, column 23)

although the color referenced work well on every other parts of the file.

Any idea ? Thanks!

This topic was automatically closed after 42 days. New replies are no longer allowed.