Open sboerrigter opened 7 years ago
Maybe it's cleaner when there are only 1 or 2 variables, but beyond this maps are a lot less verbose and more readable:
$lorem-ipsum-dolor: (
'sit-amet': 'one',
'consectetur': 'two,
'adipiscing-elit': 'three',
'pellentesque': 'four',
'ultricies-mi': 'five',
);
$lorem-ipsum-dolor-sit-amet: 'one';
$lorem-ipsum-dolor-consectetur: 'two';
$lorem-ipsum-dolor-adipiscing-elit: 'three';
$lorem-ipsum-dolor-pellentesque: 'four';
$lorem-ipsum-dolor-ultricies-mi: 'five';
I can smell some repetition and the scent is not that pleasant.
You are talking about the defining of the variables, but you do this "repetition" only once. I prefer to make the implementation of variables easier and faster because we do this a lot more during development. That is why I prefer:
$lorem-ipsum-dolor-sit-amet;
over:
map-get($lorem-ipsum-dolor, 'sit-amet')
I don't think we should change this for all variables. But only the variables that we use a lot during development. So I suggests changing things like line-height
, but not the breakpoints
array.
I think the syntax to use a variable within an array is too verbose. I prefer to use:
over:
I would like to changing (some of the) array variables to seperate variables, to decrease complexity and increase development speed.