Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generation of utilities that use slashes in arbitrary modifiers #12515

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

thecrypticace
Copy link
Contributor

In utilities like text-lg you can specify a line-height / leading value by suffixing it with a config value or an arbitrary value.

For example:

<div class="text-lg/4"></div>
<div class="text-lg/[4rem]"></div>
<div class="text-lg/[calc(4rem+12px)]"></div>

However, you couldn't use a / inside the arbitrary value like so:

<div class="text-lg/[calc(6rem/5)]"></div>

This is because we were looking for the / to split the utility at and we were finding the last / (that's next to the 6rem). Now we skip over the last / because it's inside an arbitrary value which makes sure this utility generates as expected.

Fixes #12362

@thecrypticace thecrypticace force-pushed the fix/slashes-in-arbitrary-modifiers branch from d346004 to ff88183 Compare December 1, 2023 15:28
@thecrypticace thecrypticace changed the base branch from 3.3 to master December 1, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/ is not allowed in arbitrary modifier
1 participant