how to reference a property inside of a map object

Viewed 1041

I have a map of colors, and would like to define subsequent colors in the map based on colors defined earlier within the map.

$colors: (
    primary: #184770, 
    secondary: #0969A2, 
    white: #fff, 
    black: #000, 
    green: #24b206, 
    blue: #428bca, 
    purple: #813c8e, 
    grey: (lighten( black, 25%)), 
    grey-light: (lighten( black, 35%)), 
    grey-dark: (lighten( black, 15%))      
);

I would like to specify grey, grey-light and grey-dark based on map-get($colors, black).

The example above works only because it references inherent color "black" rather than map-get($colors, black)

Can you reference a property inside the same map object?

1 Answers
Related