hyperfocalHQ/pollen

Remove width scale?

madeleineostoja opened this issue · 4 comments

The width scale was lifted straight from Tailwind as an extension of the size scale. However now that Pollen has an extended prose width scale, based on character size, is there really a need for a dedicated scale for max-widths? It's needed in tailwind since they are classes, but as raw values it seems like an antipattern compared to encouraging people to use typgraphic-based widths.

Open for comment on this one since I'm not sure.

I agree that it's not as vital as the other elements but having a few widths for containers is really useful for consistency.

What do you think about just a few widths like this? https://www.gethalfmoon.com/docs/containers/. This may make more sense as an extension of --measure.

Interesting idea of making them responsive. That would be the only value in pollen that changes based on breakpoint so I’m hesitant to introduce complexity, but it’s a cool idea.

And yeah I think I’m leaning towards just removing a bunch of values so it’s at least much simpler.

This is what I'm thinking atm. Each step roughly correlates to a typical device breakpoint but not semantically tied to devices/breakpoints

/**
  * Container widths
  * Applied as max-width
  */
--width-xs: 480px;
--width-sm: 640px;
--width-md: 768px;
--width-lg: 1024px;
--width-xl: 1280px;

Closing this, not worth removing width scale, I think having a few device-derived container widths is useful enough to keep in core