Skip to content

Commit

Permalink
fix(tailwindcss): extend default spacings instead of replacing them
Browse files Browse the repository at this point in the history
  • Loading branch information
borisdiakur committed Aug 26, 2021
1 parent 9444337 commit 3b9750d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/liquid/global/styles/tailwindPreset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ Object.entries({
fontSize[key] = value.fontSize
})

// Extract spacings
const spacing = {}
Object.entries(designTokens.spacings).forEach(([key, value]) => {
spacing[`ld-${key}`] = value
})

const preset = {
theme: {
colors,
Expand All @@ -83,8 +89,8 @@ const preset = {
body: ['Lato', 'sans-serif'],
display: ['MWeb', 'sans-serif'],
},
spacing: {
...designTokens.spacings,
extend: {
spacing,
},
},
plugins: [
Expand Down

0 comments on commit 3b9750d

Please sign in to comment.