Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variable naming of a map #2602

Open
andredewaard opened this issue Feb 11, 2019 · 1 comment
Open

variable naming of a map #2602

andredewaard opened this issue Feb 11, 2019 · 1 comment
Labels
bug Something isn't working needs info Blocked on user response

Comments

@andredewaard
Copy link

andredewaard commented Feb 11, 2019

Simple question and it doesn't really need to be fixed but why is it that i get an error while doing this:

$border-radius-100: #f8f9fa !default;
$border-radius-200: #e9ecef !default;
$border-radius-300: #dee2e6 !default;
$border-radius-400: #ced4da !default;
$border-radius-500: #adb5bd !default;
$border-radius-600: #6c757d !default;
$border-radius-700: #495057 !default;
$border-radius-800: #343a40 !default;
$border-radius-900: #212529 !default;

$border-radius: () !default;

$border-radius: map-merge(
  (
    "100": $border-radius-100,
    "200": $border-radius-200,
    "300": $border-radius-300,
    "400": $border-radius-400,
    "500": $border-radius-500,
    "600": $border-radius-600,
    "700": $border-radius-700,
    "800": $border-radius-800,
    "900": $border-radius-900
  ),
  $border-radius
);

But not when i'm doing this:

$border-radius-100: #f8f9fa !default;
$border-radius-200: #e9ecef !default;
$border-radius-300: #dee2e6 !default;
$border-radius-400: #ced4da !default;
$border-radius-500: #adb5bd !default;
$border-radius-600: #6c757d !default;
$border-radius-700: #495057 !default;
$border-radius-800: #343a40 !default;
$border-radius-900: #212529 !default;

$border-radius-map: () !default;

$border-radius-map: map-merge(
  (
    "100": $border-radius-100,
    "200": $border-radius-200,
    "300": $border-radius-300,
    "400": $border-radius-400,
    "500": $border-radius-500,
    "600": $border-radius-600,
    "700": $border-radius-700,
    "800": $border-radius-800,
    "900": $border-radius-900
  ),
  $border-radius-map
);

Error is:

$border-radius: map-merge(
               ^
      Argument `$map2` of `map-merge($map1, $map2)` must be a map
@nex3
Copy link
Contributor

nex3 commented Feb 12, 2019

@andredewaard That looks like a bug. What implementation of Sass are you using, and which version?

@nex3 nex3 added bug Something isn't working needs info Blocked on user response labels Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs info Blocked on user response
2 participants