mapbox / assembly

Making the hard parts of designing for the web easy.
https://www.mapbox.com/assembly/
134 stars 27 forks source link

Rename `scroll-hidden` to `clip` #943

Closed tristen closed 3 years ago

tristen commented 4 years ago

I think we should revert https://github.com/mapbox/assembly/issues/847. The argument was that it follows the scroll-{value} naming convention. In practice though, overflow:hidden isn't always used to target scroll behavior. One technique is to clip images in rounded containers. clip is a general enough name to capture both scenarios and is much easier to remember 😤

chrisbrainerd commented 4 years ago

This is half a specific question about this and half a general one about assembly in general - why not call it hide-overflow or something closer to what the actual CSS declaration is?

I had to use this a bit ago and knew I needed overflow: hidden; but ctrl-fing on the assembly docs didn't help me at all, had to go into the actual assembly css file to find what I needed.

tristen commented 4 years ago

why not call it hide-overflow or something closer to what the actual CSS declaration is?

I think the reasoning was that scroll-{value} had already been established. One class in that list is scroll-styled which doesn't apply overflow rules. That naming sounds like a good alternative approach though! We could rename the following:

And just leave scroll-styled on its own under the miscellaneous group in the docs.

samanpwbb commented 4 years ago

We could rename the following:

Ya, this seems like the right answer. Better than using clip.