Skip to content

Instantly share code, notes, and snippets.

@norin89
Created June 23, 2022 14:06
Show Gist options
  • Save norin89/63fc5130a41d26fb4817b7ec19c02258 to your computer and use it in GitHub Desktop.
Save norin89/63fc5130a41d26fb4817b7ec19c02258 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// Sass map, ideally imported from JSON (e.g. with https://github.com/pmowrer/node-sass-json-importer)
// Based on MUI palette example - https://mui.com/material-ui/customization/color/#picking-colors
$palette: (
primary: (
light: '#757ce8',
main: '#3f50b5',
dark: '#002884',
contrastText: '#fff',
),
secondary: (
light: '#ff7961',
main: '#f44336',
dark: '#ba000d',
contrastText: '#000',
)
);
:root {
@each $name, $variants in $palette {
@each $variant, $color in $variants {
--#{$name}-#{$variant}: #{$color};
}
}
}
:root {
--primary-light: #757ce8;
--primary-main: #3f50b5;
--primary-dark: #002884;
--primary-contrastText: #fff;
--secondary-light: #ff7961;
--secondary-main: #f44336;
--secondary-dark: #ba000d;
--secondary-contrastText: #000;
}
{
"sass": {
"compiler": "dart-sass/1.32.12",
"extensions": {},
"syntax": "SCSS",
"outputStyle": "expanded"
},
"autoprefixer": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment