-
Notifications
You must be signed in to change notification settings - Fork 7
feat(tasty): css reset #981
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 1771dad The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📦 NPM canary releaseDeployed canary version 0.0.0-canary-af0a11a. |
🧪 Storybook is successfully deployed!
|
🏋️ Size limit report
Click here if you want to find out what is changed in this build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| newBlocks.set(existingKey, existingBlock); | ||
| } | ||
| this.cssBlocks = newBlocks; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prepend method overwrites new value with old value
Low Severity
The prepend method has a logic flaw: it first sets the new entry with newBlocks.set(key, { css, source }), then iterates over all existing blocks including any entry with the same key, which overwrites the newly set value with the old one. This doesn't currently manifest because CSS_RESET is a constant and source is always undefined, making old and new values identical. However, the method would fail to update content if called with the same key but different css or source values.
| import type { StyleHandlerDefinition } from './utils/styles'; | ||
|
|
||
| // Re-export CSS_RESET for external use | ||
| export { CSS_RESET }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused re-export of CSS_RESET from config module
Low Severity
The CSS_RESET re-export from config.ts is marked "for external use" but is never included in the package's barrel file (src/tasty/index.ts). The barrel file only exports specific named exports from ./config and doesn't include CSS_RESET. Both internal consumers (config.ts and zero/babel.ts) import directly from ./css-reset, not from the re-export. This makes the re-export dead code that's inaccessible to external users.
Note
Adds an optional
cssResetconfig that injects a global CSS reset the first time styles are generated. Reset is defined inCSS_RESET(unnamed@layer) and re-exported.cssReset?: booleaninconfigure(); when true,markStylesGenerated()injectsCSS_RESETtasty/css-reset.tswith the reset; docs updated to listcssResetoptiontasty/zero/babelacceptsconfig.cssResetand prependsCSS_RESETvia newCSSWriter.prepend()styles/reset.tsinput reset mapChangeset: minor release for
@cube-dev/ui-kitWritten by Cursor Bugbot for commit 1771dad. This will update automatically on new commits. Configure here.