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

Remove bare value handling for perspective utilities #13288

Merged
merged 3 commits into from
Mar 20, 2024

Conversation

adamwathan
Copy link
Member

This PR removes bare value handling from the perspective utilities, so that utilities like perspective-300 will no longer generate declarations like perspective: 300px.

Generally we support bare values as a way to avoid putting things into the default theme, and since the perspective utilities already have a named scale in the theme I don't think it makes sense to support bare values. Bare values should be thought of as real API that we would include in the IntelliSense completions list when someone is typing a utility, and I don't think we want to include any numeric values in that list for perspective 👍

Comment on lines -3145 to -3148
.perspective-123 {
perspective: 123px;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should move the perspective-123 example to the expect below where we explicitly test that it doesn't generate anything.

This is now moved to the spot where we ensure that nothing is generated
at all. This prevents us from accidentally updating a snapshot and
missing a potential bug.
@RobinMalfait RobinMalfait merged commit 89a0b86 into next Mar 20, 2024
1 check passed
@RobinMalfait RobinMalfait deleted the remove-perspective-bare-values branch March 20, 2024 14:25
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.

4 participants