Skip to content
This repository was archived by the owner on Sep 26, 2022. It is now read-only.
This repository was archived by the owner on Sep 26, 2022. It is now read-only.

Possible error in map-deep-merge function #262

Description

@Danacus

The function call to non-destructive-map-merge might have to be a recursive call to map-deep-merge.

} @else {
$result: map-merge(
$result,
(
$key: non-destructive-map-merge(map-get($result, $key), $value),
)
);
}
}

I believe this is why I can't create a custom dark theme if I try to edit one of the nested maps, like this for example:

$material-dark-theme: (
    'surface': #1d753a,
    'text': (
      'primary': material-color('shades', 'white'),
      'secondary': rgba(material-color('shades', 'white'), 0.7),
      'disabled': rgba(material-color('shades', 'white'), 0.5),
      'link': material-color('blue', 'accent-1'),
    ),
);

which results into the following error:

("primary": #ffffff, "secondary": rgba(255, 255, 255, 0.7), "disabled": rgba(255, 255, 255, 0.5), "link": #82b1ff) isn't a valid CSS value.
   ╷
27 │           $key: non-destructive-map-merge(map-get($result, $key), $value),
   │                                           ^^^^^^^^^^^^^^^^^^^^^^
   ╵
  node_modules/svelte-materialify/src/styles/tools/_functions.scss 27:43  map-deep-merge()
  node_modules/svelte-materialify/src/styles/_variables.scss 329:23       @import
  src/routes/__layout.svelte 2:11                                         root stylesheet

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions