Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions scripts/convert-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,14 @@ const makeColorUtility = (
colors
.filter((color) => color.name.startsWith(tokenPrefix))
.map(
(color) => `
'${
(color) => `${
(color.original.description &&
// FIXME: Remove replace once https://github.com/tailwindlabs/tailwindcss/issues/7420 is fixed
`/* ${color.original.description.trim()} */ \\n`.replace(/,/g, ';')) ||
`
/* ${color.original.description.trim()} */
`.replace(/,/g, ';')) ||
''
}.${color.name.replace(tokenPrefix, classPrefix)}': {
}'.${color.name.replace(tokenPrefix, classPrefix)}': {
${properties.map((prop) => `'${prop}': 'var(--${color.name})'`)}
}`,
)
Expand Down
38 changes: 24 additions & 14 deletions styles/dist/tailwind-tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ module.exports.colorUtilities = {
'.bg-disabled': {
'background-color': 'var(--surface-disabled)',
},
'/* Command menu backdrop */ \n.bg-scrim': {
/* Command menu backdrop */
'.bg-scrim': {
'background-color': 'var(--surface-scrim)',
},
'.bg-accent': {
Expand Down Expand Up @@ -311,7 +312,8 @@ module.exports.colorUtilities = {
'.border-raise': {
'border-color': 'var(--stroke-raise)',
},
'/* Matches the default surface color */ \n.border-surface': {
/* Matches the default surface color */
'.border-surface': {
'border-color': 'var(--stroke-surface)',
},
'.border-accent': {
Expand Down Expand Up @@ -401,7 +403,8 @@ module.exports.colorUtilities = {
'.border-l-raise': {
'border-left-color': 'var(--stroke-raise)',
},
'/* Matches the default surface color */ \n.border-l-surface': {
/* Matches the default surface color */
'.border-l-surface': {
'border-left-color': 'var(--stroke-surface)',
},
'.border-l-accent': {
Expand Down Expand Up @@ -491,7 +494,8 @@ module.exports.colorUtilities = {
'.border-r-raise': {
'border-right-color': 'var(--stroke-raise)',
},
'/* Matches the default surface color */ \n.border-r-surface': {
/* Matches the default surface color */
'.border-r-surface': {
'border-right-color': 'var(--stroke-surface)',
},
'.border-r-accent': {
Expand Down Expand Up @@ -581,7 +585,8 @@ module.exports.colorUtilities = {
'.border-t-raise': {
'border-top-color': 'var(--stroke-raise)',
},
'/* Matches the default surface color */ \n.border-t-surface': {
/* Matches the default surface color */
'.border-t-surface': {
'border-top-color': 'var(--stroke-surface)',
},
'.border-t-accent': {
Expand Down Expand Up @@ -671,7 +676,8 @@ module.exports.colorUtilities = {
'.border-b-raise': {
'border-bottom-color': 'var(--stroke-raise)',
},
'/* Matches the default surface color */ \n.border-b-surface': {
/* Matches the default surface color */
'.border-b-surface': {
'border-bottom-color': 'var(--stroke-surface)',
},
'.border-b-accent': {
Expand Down Expand Up @@ -766,7 +772,8 @@ module.exports.colorUtilities = {
'border-left-color': 'var(--stroke-raise)',
'border-right-color': 'var(--stroke-raise)',
},
'/* Matches the default surface color */ \n.border-x-surface': {
/* Matches the default surface color */
'.border-x-surface': {
'border-left-color': 'var(--stroke-surface)',
'border-right-color': 'var(--stroke-surface)',
},
Expand Down Expand Up @@ -886,7 +893,8 @@ module.exports.colorUtilities = {
'border-top-color': 'var(--stroke-raise)',
'border-bottom-color': 'var(--stroke-raise)',
},
'/* Matches the default surface color */ \n.border-y-surface': {
/* Matches the default surface color */
'.border-y-surface': {
'border-top-color': 'var(--stroke-surface)',
'border-bottom-color': 'var(--stroke-surface)',
},
Expand Down Expand Up @@ -1001,7 +1009,8 @@ module.exports.colorUtilities = {
'.ring-raise': {
'--tw-ring-color': 'var(--stroke-raise)',
},
'/* Matches the default surface color */ \n.ring-surface': {
/* Matches the default surface color */
'.ring-surface': {
'--tw-ring-color': 'var(--stroke-surface)',
},
'.ring-accent': {
Expand Down Expand Up @@ -1091,7 +1100,8 @@ module.exports.colorUtilities = {
'.outline-raise': {
'outline-color': 'var(--stroke-raise)',
},
'/* Matches the default surface color */ \n.outline-surface': {
/* Matches the default surface color */
'.outline-surface': {
'outline-color': 'var(--stroke-surface)',
},
'.outline-accent': {
Expand Down Expand Up @@ -1220,10 +1230,10 @@ module.exports.colorUtilities = {
'.chart-stroke-y-axis': {
stroke: 'var(--chart-stroke-y-axis)',
},
'/* Used as a stroke in conjuction with a fill. For discrete shapes e.g. bar charts; pie charts; tree maps. */ \n.chart-stroke-item':
{
stroke: 'var(--chart-stroke-item)',
},
/* Used as a stroke in conjuction with a fill. For discrete shapes e.g. bar charts; pie charts; tree maps. */
'.chart-stroke-item': {
stroke: 'var(--chart-stroke-item)',
},
'.chart-stroke-item-inactive': {
stroke: 'var(--chart-stroke-item-inactive)',
},
Expand Down