canonical / vanilla-framework

From community websites to web applications, this CSS framework will help you achieve a consistent look and feel.
https://vanillaframework.io
GNU Lesser General Public License v3.0
825 stars 166 forks source link

Subnav using colours in media queries #3371

Closed anthonydillon closed 3 years ago

anthonydillon commented 3 years ago

In _patterns_subnav.scss we are using hex colours in media queries. This is way before its time and unlikely to be supported by browsers for many years.

Could we revert to using units of measurement that are comprehendible by computers in this century, please?

bartaz commented 3 years ago

Weirdly enough this seems to be only applying some color to ::before that is not rendered at all. Tried to find anything in git history, but it seems it was never really doing anything because this ::before never had any styles that would show it...

https://github.com/canonical-web-and-design/vanilla-framework/blob/becfcd90ff1c5fd2fc11fa6c5c75c5b59a1729f5/scss/_patterns_subnav.scss#L167-L172

I suppose the intention might have been to add separators between the items on small screens (as there are no separators between subnav items now):

Screenshot 2020-10-21 at 18 14 41

But subnav styles were reviewed recently (when updating styling highlight), so I suppose they are as we want them. Can you confirm @lyubomir-popov ?

If so, I guess we can just remove this erroring media query alltogether.

lyubomir-popov commented 3 years ago

I don't think we need separators (we'd need to match the parent item height if we did). I'd just remove it.

anthonydillon commented 3 years ago

Thanks for looking into it @bartaz. Question is can we have this released and updated by the end of the week, which is the MAAS release?

bartaz commented 3 years ago

@anthonydillon Shouldn't be an issue - but does it affect MAAS in any way? This doesn't seem to cause any problems (because it's never applied), so it seems to be just a code cleanup rather than a bugfix.

anthonydillon commented 3 years ago

They just don't like the error in the console.