Skip to content

Commit

Permalink
chore: Updated unique id generation for classnames
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-bagwell committed Sep 10, 2024
1 parent 3f613f7 commit 04ecfc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function createStyleObjectNode(styles: string, name?: string) {
[
ts.factory.createPropertyAssignment(
ts.factory.createIdentifier('name'),
ts.factory.createStringLiteral(name || generateUniqueId()) // We might be using values that are resolved at runtime, but should still be static. We're only supporting the `cs` function running once per file, so a stable id based on a hash is not necessary
ts.factory.createStringLiteral(generateUniqueId()) // We might be using values that are resolved at runtime, but should still be static. We're only supporting the `cs` function running once per file, so a stable id based on a hash is not necessary
),
ts.factory.createPropertyAssignment(
ts.factory.createIdentifier('styles'),
Expand Down
2 changes: 1 addition & 1 deletion modules/styling/lib/cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ export function handleCsProp<
// In order to allow everyone to use createStyles and createStencil without worrying about style merge issues, we're going
// to enable compat mode all the time. We'll look into possible out-of-order execution issues in the future and plan to re-enable
// full static mode (for better performance) once we know why this is happening and have a proper workaround.
let shouldRuntimeMergeStyles = true;
let shouldRuntimeMergeStyles = false;

// The order is intentional. The `className` should go first, then the `cs` prop. If we don't do
// runtime merging, this order doesn't actually matter because the browser doesn't care the order
Expand Down

0 comments on commit 04ecfc2

Please sign in to comment.