Skip to content

Commit

Permalink
Add directional keys back for compatebility
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas committed Jan 6, 2020
1 parent 0ad8f06 commit 9c656d3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
11 changes: 11 additions & 0 deletions corePlugins/borderRadiusDir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import generator from '../util/generator';
import theme from '../util/configHandler';

export default generator.generate('rounded-dir', 'borderRadius', theme.borderRadius, [
['e', ['borderTopEndRadius', 'borderBottomEndRadius']],
['s', ['borderTopStartRadius', 'borderBottomStartRadius']],
['ts', 'borderTopStartRadius'],
['te', 'borderTopEndRadius'],
['be', 'borderBottomEndRadius'],
['bs', 'borderBottomStartRadius'],
]);
8 changes: 8 additions & 0 deletions corePlugins/borderWidthDir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import generator from '../util/generator';
import theme from '../util/configHandler';

export default generator.generate('border-dir', 'borderWidth', theme.borderWidth, [
['x', ['borderEndWidth', 'borderStartWidth']],
['e', 'borderEndWidth'],
['s', 'borderStartWidth'],
]);
6 changes: 6 additions & 0 deletions corePlugins/insetDir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import generator from '../util/generator';
import theme from '../util/configHandler';

export default generator.generate('inset-dir', ['top', 'bottom', 'start', 'end'], theme.inset, [
['x', ['start', 'end']],
]);
6 changes: 6 additions & 0 deletions tailwind.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ import width from './corePlugins/width';
import zIndex from './corePlugins/zIndex';
import boxShadow from './corePlugins/boxShadow';
import textShadow from './corePlugins/textShadow';
import insetDir from './corePlugins/insetDir';
import borderWidthDir from './corePlugins/borderWidthDir';
import borderRadiusDir from './corePlugins/borderRadiusDir';

let style = {};

Expand Down Expand Up @@ -110,6 +113,9 @@ Object.assign(style,
tint,
width,
zIndex,
borderRadiusDir,
borderWidthDir,
insetDir,
);

export default StyleSheet.create(style);

0 comments on commit 9c656d3

Please sign in to comment.