Skip to content

Remove unnecessary loop in preset.scss #3593

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

Merged
merged 4 commits into from
Jul 11, 2025

Conversation

NaokiM03
Copy link
Contributor

@NaokiM03 NaokiM03 commented Jul 5, 2025

Linked Issue

Closes #3592

Description

Remove the duplicate loop since it's iterating under the same condition.
With this change, the compiled preset.css file size is reduced from 140KB to 24KB.

Checklist

Please read and apply all contribution requirements.

  • Your branch should be prefixed with: docs/, feature/, chore/, bugfix/
  • Contributions should target the main branch
  • Documentation should be updated to describe all relevant changes
  • Run pnpm check in the root of the monorepo
  • Run pnpm format in the root of the monorepo
  • Run pnpm lint in the root of the monorepo
  • Run pnpm test in the root of the monorepo
  • If you modify /package projects, please supply a Changeset

Changsets

View our documentation to learn more about Changesets. To create a Changeset:

  1. Navigate to the root of the monorepo in your terminal
  2. Run pnpm changeset and follow the prompts
  3. Commit and push the changeset before flagging your PR review for review.

Copy link

changeset-bot bot commented Jul 5, 2025

🦋 Changeset detected

Latest commit: 46c3cc5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@skeletonlabs/skeleton Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jul 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
www.skeleton.dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 11, 2025 3:06pm

Copy link
Contributor

@endigo9740 endigo9740 left a comment

Choose a reason for hiding this comment

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

Good catch. I am not sure how that slipped through but it would have been in place since launch. I'll want to personally review the output to verify the change, so this likely won't happen until Monday. But if all is well I'll merge and release asap. Thanks.

@endigo9740
Copy link
Contributor

Just want to say kudos for catching this @NaokiM03. There's worst things in the world than duplicating CSS, but it's frustrating it took this long to identify such as annoying issue. Really appreciate the assist! The Presets moving to their own stylesheet was a last minute change before launch so I think this one just slipped by.

I'm merging now and will release in a few moments so this is widely available to everyone.

@endigo9740 endigo9740 merged commit 92feac4 into skeletonlabs:main Jul 11, 2025
8 checks passed
@NaokiM03 NaokiM03 deleted the bugfix/remove-unnecessary-loop branch July 12, 2025 02:03
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.

The code size is increasing because the same @each condition is being repeated in preset.scss
2 participants