Closed sareh closed 5 years ago
@shaunbent @mintuz What do you think? Especially about the updates to existing object patterns.
Probably worth noting that the keyline Sass produces quite a bit of CSS. We could optimise it a fair bit if we split it into separate keyline/spacing classes like gs-o-keyline
and gs-o-keyline__spacing+
OK, to minimise the size further, should we remove the spacing variations completely? So that we just use gs-o-keyline
& gs-o-no-keyline
for horizontal and gs-o-keyline-vertical
& gs-o-no-keyline-vertical
Then, if anyone wants spacing, they can use the gs-u-mb
gs-u-mb+
gs-u-mb++
classes in conjunction with these?
Just an example use-case makes it look a bit complicated, though :/
e.g. gs-o-keyline gs-u-mb+ gs-o-no-keyline@m gs-u-mb0@m
Not quite -- the margin & padding utility classes apply to the selected element but keylines are on an ::after element.
Oh yes, of course! /o\
@wildlyinaccurate What do you think of the changes to keyline.scss
?
+1 for removing the mixin -- I think that made them more confusing and (to my surprise) didn't help Sass to optimise the CSS at all.
I'm not sure about the keyline class changes though. The convention everywhere else in Grandstand is that a "plus" class is double($gel-spacing-unit)
and "plusplus" is quadruple($gel-spacing-unit)
. I think making the keylines different confuses things. It also gives the impression that having zero padding is the norm, when actually we only use the zero padding variant once.
OK, I thought that having a gs-o-no-keyline
and a gs-o-keyline0
would be confusing, but yes, consistency with the rest of grandstand makes more sense. :)
To be fair, the whole thing is confusing. My first thought when I see keyline+
is "oh it'll be a double-width keyline". 😕
lib/objects/_keyline.scss
lib/objects/_link.scss
lib/objects/_responsive-image.scss
to add --lead classThe change to responsive-image is because we want to a) not load images by default on core b) only load images on core if they have a '--lead' class. We compromised, since we wanted to initally modify
gs-o-responsive-image
to havedisplay: none;
on core &display: none;
on enhanced, but realised this would break current functionality for everyone using this class currently. That is why we added the (admittedly not-well-named) classgs-o-responsive-image--enhanced-only
. Any suggestions would be welcome!