tailwindcss-dir
tailwindcss-dir copied to clipboard
versioning question
Hi,
Increasing the major version often implies there are breaking changes, but i can't tell outright from the commits whether this is the case.
Are you using a specific versioning strategy like semver?
Thanks
Yes, I use semver
On Wed, Dec 11, 2019, 06:17 Kevin Batdorf [email protected] wrote:
Hi,
Increasing the major version often implies there are breaking changes, but i can't tell outright from the commits whether this is the case.
Are you using a specific versioning strategy like semver?
Thanks
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/RonMelkhior/tailwindcss-dir/issues/11?email_source=notifications&email_token=AAHYO6JLXMRS4NDNZ7OU7TLQYBST7A5CNFSM4JZI5O4KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H7UXXVQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHYO6KVB6V4RBH645STPHDQYBST7ANCNFSM4JZI5O4A .
Can you explain what the breaking change from 3.0.2 -> 4.0.0 was? Thanks
Looking here it seems like you updated it to generate classnames in case someone wants to add a class to the html element. Is that correct?
We added support for same-level dir attributes. So for example:
<div dir="rtl" class="ltr:ml-10 rtl:mr-10">
<span class="ltr:ml-6 rtl:mr-6">Hi!</span>
</div>
Previously, in v3, the rtl:mr-10
class in the div
wouldn't work because the CSS generated only checked if a parent element had the dir attribute.
In v4, we added support for same level (which you can see from the generated CSS in the test in the link you sent).
Obviously this can lead to some side effects, so I bumped the major version.
Okay, I understand. Is it normal to add the dir attribute like that (I'm genuinely asking as I don't know)?
If not, it seems like something that could be an option? Especially since it will nearly double the output size. I imagine it could an easy edit. I can send a PR if you'd like.
In this project where I use this library, there are certain areas where I have to force LTR regardless of the site's general direction/language at that moment, so it can be handy.
As for size/making this an option, if you are using PurgeCSS, I wouldn't worry about the size too much, but if you insist, you can submit a PR to add an option to disable same-level support.
Okay thanks. I'll send a PR in the next day or two to disable it. I'm using this on a WordPress project where I can't readily purge the CSS, unfortunately.