madeleineostoja / rucksack

A little bag of CSS superpowers, built on PostCSS
https://www.rucksackcss.org
Other
1.85k stars 58 forks source link

add postcss-aspect-ratio #42

Open dbox opened 8 years ago

dbox commented 8 years ago

Seems perfect for Rucksack.. something everyone has to have in their responsive toolkit. https://github.com/arccoza/postcss-aspect-ratio

Happy to attempt a PR if you want it.

dbox commented 7 years ago

@seaneking would you accept a PR with this?

madeleineostoja commented 7 years ago

whoops sorry missed this. Not sure if aspect ratio us a good fit for rucksack or not, it's quite heavy handed it what it does. As a developer looking through code with that declaration in it, I wouldn't expect the children of the element to be absolutely positioned etc etc.

More than happy to get feedback from the community on this one though, if there's demand for it then would definitely consider it.

dbox commented 7 years ago

It's a very standard (and crucial imho) technique, but obviously it's your call. :)

madeleineostoja commented 7 years ago

The padding hack is, but all the other assumptions postcss-aspect ratio make aren't (abspos children etc). That said haven't looked at it for a while.

dbox commented 7 years ago

There's no other way to do content inside it without it.

jescalan commented 7 years ago

Would love to see this functionality added, its a nice shortcut for a common css code pattern 👬

covingtondoan commented 7 years ago

+1 for aspect ratios!

I find myself needing to do that more often that I would have thought.

madeleineostoja commented 7 years ago

Okay, sounds like I'm the minority on this one. Would accept a PR.

While we're all here - what do we think of https://github.com/simplaio/rucksack/issues/47?

FWIW postcss-alias is pretty buggy, and the bugs are pretty fundamental (regexing aliases out of both property names and values).

dbox commented 7 years ago

sweet. I'll PR this

mwickett commented 7 years ago

Excited that this will be added - another vote for it!