createTextStyle
: Correctly pass through debugId
and remove redundant classname
#227
+6
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed that one of the typography styles in Braid's
Text
component contained a classname without a debug ID:I believe this is the composed classname from the outer
style
call increateTextStyle
. It doesn't automatically get a debug ID because Vanilla Extract's automatic debug ID generation only runs on.css.*
files, butcreateTextStyle
is inside anindex.mjs/cjs
file, so it gets missed. I assume this is whydebugId
is propagated throughcreateTextStyle
, but it should've also been passed to the outer style call.I've made 2 changes in this PR:
debugId
on the outerstyle
callstyle
callWithout removing the inner
style
call, the composed classname would've had a debug ID, but by removing it we actually end up generating 1 less classname, while maintaining all debug IDs, which I think is better overall.Braid
Text
component classnames with this change: