tailwindcss-dir icon indicating copy to clipboard operation
tailwindcss-dir copied to clipboard

versioning question

Open KevinBatdorf opened this issue 4 years ago • 7 comments

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

KevinBatdorf avatar Dec 11 '19 04:12 KevinBatdorf

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 .

RonMelkhior avatar Dec 11 '19 09:12 RonMelkhior

Can you explain what the breaking change from 3.0.2 -> 4.0.0 was? Thanks

KevinBatdorf avatar Dec 11 '19 09:12 KevinBatdorf

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?

KevinBatdorf avatar Dec 11 '19 09:12 KevinBatdorf

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.

RonMelkhior avatar Dec 11 '19 09:12 RonMelkhior

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.

KevinBatdorf avatar Dec 11 '19 09:12 KevinBatdorf

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.

RonMelkhior avatar Dec 11 '19 09:12 RonMelkhior

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.

KevinBatdorf avatar Dec 11 '19 09:12 KevinBatdorf