Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get a "unclosed parenthesis" error with this SASS line?

Tags:

sass

My gulp setup yields the following error:

assets\styles\core\_z-indexes.scss
Error: unclosed parenthesis
        on line 2 of assets/styles/core/_z-indexes.scss
>>   mobile_menu: 40;
   ---------------^

Below is the content of the file in question. What's wrong with it?

$zIndexes: (
  mobile_menu: 40; 
);

@function getIndex($zIndexName) {
  @return map-get($zIndexes, $zIndexName);
}
like image 848
drake035 Avatar asked Dec 19 '22 15:12

drake035


1 Answers

Don't use the semicolons in your map, separate values with commas , and keep the last one open.

$zIndexes: (
  mobile_menu: 40
);

@function getIndex($zIndexName) {
  @return map-get($zIndexes, $zIndexName);
}

If this is not it maybe put your 'mobile_menu' in quotes.

like image 57
MMachinegun Avatar answered Mar 03 '23 06:03

MMachinegun