Skip to content

Commit

Permalink
reset some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasoppermann committed Jan 21, 2025
1 parent 2119289 commit 2801d5a
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 18 deletions.
3 changes: 1 addition & 2 deletions src/formats/cssAdvanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export const cssAdvanced: FormatFn = async ({
// add css with or without query
output.push(queryString ? `${queryString} { ${cssWithSelector} }` : cssWithSelector)
}
return output.join('\n')
// return prettified
// return await format(output.join('\n'), {parser: 'css', printWidth: 500})
return await format(output.join('\n'), {parser: 'css', printWidth: 500})
}
2 changes: 1 addition & 1 deletion src/formats/utilities/createPropertyFormatterWithRef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export default function createPropertyFormatterWithRef({
}
// console.log('originalValue:', originalValue, JSON.stringify(originalIsObject), ref)

const objectReplaceRegex = token.attributes.referenceMap
const objectReplaceRegex = (value as string).match(/{/)
? new RegExp(`{${ref.path.join('\\.')}(\\.\\$?value)?}`, 'g')
: refVal
// TODO: add test
Expand Down
1 change: 0 additions & 1 deletion src/platforms/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const css: PlatformInitializer = (outputFile, prefix, buildPath, options)
'dimension/rem',
'duration/css',
'shadow/css',
'border/cssRefAttribute',
'border/css',
'typography/css',
'fontFamily/css',
Expand Down
2 changes: 0 additions & 2 deletions src/primerStyleDictionary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ PrimerStyleDictionary.registerTransform(shadowToCss)

PrimerStyleDictionary.registerTransform(borderToCss)

PrimerStyleDictionary.registerTransform(borderToCssRefAttribute)

PrimerStyleDictionary.registerTransform(typographyToCss)

PrimerStyleDictionary.registerTransform(fontWeightToNumber)
Expand Down
11 changes: 0 additions & 11 deletions src/transformers/borderToCss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,3 @@ export const borderToCss: Transform = {
return `${value.width} ${value.style} ${value.color}`
},
}

/**
*/
export const borderToCssRefAttribute: Transform = {
name: 'border/cssRefAttribute',
type: 'attribute',
filter: isBorder,
transform: (_token: TransformedToken) => ({
referenceMap: `[width] [style] [color]`,
}),
}
1 change: 0 additions & 1 deletion src/transformers/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export {borderToCss} from './borderToCss.js'
export {borderToCssRefAttribute} from './borderToCss.js'
export {colorToHex} from './colorToHex.js'
export {colorToRgbAlpha} from './colorToRgbAlpha.js'
export {colorToRgbaFloat} from './colorToRgbaFloat.js'
Expand Down

0 comments on commit 2801d5a

Please sign in to comment.