Closed 27pchrisl closed 2 years ago
Hey! Thank you for your PR! Much appreciated! 🙏
I don't think this is necessary anymore because we fixed this in Tailwind CSS itself. Here is a Play that showcases the fix: https://play.tailwindcss.com/eiH7wzOxS0?file=css
It currently generates this:
.sixteen-by-nine {
position: relative;
padding-bottom: calc(var(--tw-aspect-h) / var(--tw-aspect-w) * 100%);
--tw-aspect-w: 16
}
.sixteen-by-nine > * {
position: absolute;
height: 100%;
width: 100%;
top: 0;
right: 0;
bottom: 0;
left: 0
}
.sixteen-by-nine {
--tw-aspect-h: 9
}
Fixes #2 References https://github.com/tailwindlabs/tailwindcss/issues/3360
There is an issue in tailwind with the way it applies
@apply
rules where the class it's trying to rewrite has been provided as one of a comma separated list of classes such as:While this is pending a fix in TW, this avoids the issue by exploding out the classes in this plugin.
Given the input:
The previous output was:
With this change it is: