oddbird / accoutrement

Combined Sass Accoutrement tools, with option for individual module imports
MIT License
37 stars 6 forks source link

Add a toggle between min- and max- media query overlap prevention #24

Closed joelschou closed 5 years ago

joelschou commented 6 years ago

The _a_fix-max breakpoint overlap avoidance is great, but would be even better with a similar _a_fix-min option. I added this to my fork through a global $breakpoint-avoid-overlap: 'max'|'min'; variable, which feels a little inelegant but did the trick. I didn't PR for that very reason.

https://github.com/joelschou/accoutrement/commit/7262ab1c29457405ec757e0b0f473a7812e51bf1

mirisuzanne commented 6 years ago

Open to brainstorming cleaner solutions. Is this best handled as a global override, or a per-query override to our existing fix-max default?

joelschou commented 6 years ago

I did it global for a couple reasons:

  1. It feels like a decision between mobile-first and desktop-first, and that's one of those decisions that should probably be made once for a single project.
  2. The adjustment is largely invisible to the developer—above(), below(), and between() just make it happen automagically. Allowing per-query overrides is a little bit like seeing how the sausage is made.

Just one dude's opinion!