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

functions in CSS declarations (like CSS var) are being incorrectly optimized #1242

Closed
thescientist13 opened this issue Jun 7, 2024 · 0 comments · Fixed by #1243 or #1208
Closed

functions in CSS declarations (like CSS var) are being incorrectly optimized #1242

thescientist13 opened this issue Jun 7, 2024 · 0 comments · Fixed by #1243 or #1208
Assignees
Labels
alpha.3 bug Something isn't working CLI P0 Critical issue that should get addressed ASAP v0.30.0
Milestone

Comments

@thescientist13
Copy link
Member

Summary

When writing a CSS selector that has a CSS Variable (Function) that comes after something like an Identifier, the resulting CSS is incorrectly optimized with a space missing between the Declaration values

Input

.snippet {
  padding: 0 var(--size-4);
}

Output

# actual
.snippet{padding:0var(--size-4);}

# expected
.snippet{padding:0 var(--size-4);}

and thus "breaks" in browsers
Screenshot 2024-06-07 at 11 38 29 AM

Details

Interestingly enough, the other way around works just fine

Input

.snippet {
  margin: var(--size-4) 0;
}

Output

.snippet{margin:var(--size-4) 0;}

Screenshot 2024-06-07 at 11 38 29 AM

@thescientist13 thescientist13 added bug Something isn't working P0 Critical issue that should get addressed ASAP CLI alpha.3 v0.30.0 labels Jun 7, 2024
@thescientist13 thescientist13 added this to the 1.0 milestone Jun 7, 2024
@thescientist13 thescientist13 self-assigned this Jun 7, 2024
@thescientist13 thescientist13 changed the title functions in CSS declarations (like CSS Variables) are being optimized incorrectly functions in CSS declarations (like CSS var) are being optimized incorrectly Jun 7, 2024
@thescientist13 thescientist13 changed the title functions in CSS declarations (like CSS var) are being optimized incorrectly functions in CSS declarations (like CSS var) are being incorrectly optimized Jun 7, 2024
@thescientist13 thescientist13 moved this from 🏗 In progress to 👀 In review in [Greenwood] Phase 9 - Standards and Conventions Jun 7, 2024
@thescientist13 thescientist13 mentioned this issue Jun 22, 2024
39 tasks
@thescientist13 thescientist13 linked a pull request Jun 22, 2024 that will close this issue
39 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.3 bug Something isn't working CLI P0 Critical issue that should get addressed ASAP v0.30.0
Projects
No open projects
1 participant