Skip to content

Commit

Permalink
🐛 Fix spacious/comfortable had same values
Browse files Browse the repository at this point in the history
  • Loading branch information
oddvernes committed Jun 14, 2024
1 parent d5c4fe1 commit 9adb054
Show file tree
Hide file tree
Showing 4 changed files with 459 additions and 169 deletions.
23 changes: 19 additions & 4 deletions packages/eds-tokens-build/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,9 @@ export function run({ outputReferences } = { outputReferences: true }) {
},
})

const densityTrimmed = StyleDictionary.extend({
const densitySpaciousTrimmed = StyleDictionary.extend({
include: [SPACING_PRIMITIVE_SOURCE, DENSITY_FIGMA_SOURCE],
source: [DENSITY_SPACIOUS_SOURCE, DENSITY_COMFORTABLE_SOURCE],
source: [DENSITY_SPACIOUS_SOURCE],
platforms: {
css: {
transformGroup: 'css',
Expand All @@ -473,6 +473,21 @@ export function run({ outputReferences } = { outputReferences: true }) {
outputReferences: false,
},
},
],
},
},
})

const densityComfortableTrimmed = StyleDictionary.extend({
include: [SPACING_PRIMITIVE_SOURCE, DENSITY_FIGMA_SOURCE],
source: [DENSITY_COMFORTABLE_SOURCE],
platforms: {
css: {
transformGroup: 'css',
prefix: systemName,
buildPath: `${cssBuildPath}/${spacingBuildPath}`,
transforms: cssTransforms,
files: [
{
filter: (token) =>
includeTokenFilter(token, ['Density', 'Comfortable']),
Expand Down Expand Up @@ -521,8 +536,8 @@ export function run({ outputReferences } = { outputReferences: true }) {
spacingPrimitives.buildAllPlatforms()
densityComfortable.buildAllPlatforms()
densitySpacious.buildAllPlatforms()
// densityComfortableTrimmed.buildAllPlatforms()
densityTrimmed.buildAllPlatforms()
densitySpaciousTrimmed.buildAllPlatforms()
densityComfortableTrimmed.buildAllPlatforms()
}

function transformNumberToRem(value: number): string {
Expand Down
Loading

0 comments on commit 9adb054

Please sign in to comment.