Skip to content

Commit

Permalink
feat: add new border-spacing utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadsammy committed May 21, 2023
1 parent 79a9649 commit ab1090c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/cli/core/ClassnamesGenerator.ts
Expand Up @@ -160,7 +160,14 @@ export class ClassnamesGenerator {
};

private tables = (): Tables => {
return nonConfigurableClassNames.tables;
return {
...nonConfigurableClassNames.tables,
borderSpacing: ['', '-x', '-y'].flatMap(side => {
return Object.keys(
_.isEmpty(this._theme.borderSpacing) ? this._theme.spacing : this._theme.borderSpacing,
).map(value => `border-spacing${side}-${value}`);
}),
};
};

private effects = (): Effects => {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/types/classes.ts
Expand Up @@ -179,7 +179,7 @@ type TSpacingCategoryItem = 'padding' | 'margin' | 'space';

type TSVGCategoryItem = 'fill' | 'stroke' | 'strokeWidth';

type TTablesCategoryItem = 'borderCollapse' | 'tableLayout';
type TTablesCategoryItem = 'borderCollapse' | 'tableLayout' | 'borderSpacing';

type TTransformsCategoryItem = 'scale' | 'rotate' | 'translate' | 'skew' | 'transformOrigin';

Expand Down

0 comments on commit ab1090c

Please sign in to comment.