File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @vanilla-extract/css ' : patch
3+ ---
4+
5+ Reduce CSS var and identifier lengths
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ function getShortFileName() {
1515}
1616
1717export function generateIdentifier ( debugId : string | undefined ) {
18- const refCount = getAndIncrementRefCounter ( ) ;
18+ // Convert ref count to base 36 for optimal hash lengths
19+ const refCount = getAndIncrementRefCounter ( ) . toString ( 36 ) ;
1920 const { filePath, packageName } = getFileScope ( ) ;
2021 const fileScopeHash = hash (
2122 packageName ? `${ packageName } ${ filePath } ` : filePath ,
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ type ThemeVars<ThemeContract extends Contract> = MapLeafNodes<
1515> ;
1616
1717export function createVar ( debugId ?: string ) {
18- const refCount = getAndIncrementRefCounter ( ) ;
18+ // Convert ref count to base 36 for optimal hash lengths
19+ const refCount = getAndIncrementRefCounter ( ) . toString ( 36 ) ;
1920 const { filePath, packageName } = getFileScope ( ) ;
2021 const fileScopeHash = hash (
2122 packageName ? `${ packageName } ${ filePath } ` : filePath ,
You can’t perform that action at this time.
0 commit comments