Skip to content

Commit

Permalink
New cursor pointer options & Box sizing classes added
Browse files Browse the repository at this point in the history
  • Loading branch information
atakantepe committed Aug 24, 2023
1 parent 9699759 commit f5d31b6
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 8 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@
invert
drop-shadow
- Font families & new font weights and new text aligns added
- Scale classes added to Transform
- Scale classes added to Transform
- New cursor pointer options added
- Box sizing classes added
41 changes: 34 additions & 7 deletions lib/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,42 @@ module.exports = (root, opts) => {
'appearance-none': 'none'
};

const outline = {
'outline-none': 'none'
};

const pointerEvents = {
'pointer-events-none': 'none',
'pointer-events-auto': 'auto'
};

const cursor = {
'cursor-auto': 'auto',
'cursor-default': 'default',
'cursor-pointer': 'pointer',
'cursor-wait': 'wait',
'cursor-move': 'move'
'cursor-move': 'move',
'cursor-help': 'help',
'cursor-text': 'text',
'cursor-vertical-text': 'vertical-text',
'cursor-alias': 'alias',
'cursor-copy': 'copy',
'cursor-no-drop': 'no-drop',
'cursor-not-allowed': 'not-allowed',
'cursor-grab': 'grab',
'cursor-grabbing': 'grabbing',
'cursor-col-resize': 'col-resize',
'cursor-row-resize': 'row-resize',
'cursor-n-resize': 'n-resize',
'cursor-e-resize': 'e-resize',
'cursor-s-resize': 's-resize',
'cursor-w-resize': 'w-resize',
'cursor-ne-resize': 'ne-resize',
'cursor-nw-resize': 'nw-resize',
'cursor-se-resize': 'se-resize',
'cursor-sw-resize': 'sw-resize',
'cursor-ew-resize': 'ew-resize',
'cursor-ns-resize': 'ns-resize',
'cursor-nesw-resize': 'nesw-resize',
'cursor-nwse-resize': 'nwse-resize',
'cursor-zoom-in': 'zoom-in',
'cursor-zoom-out': 'zoom-out',
};

const userSelect = {
Expand All @@ -42,10 +64,15 @@ module.exports = (root, opts) => {
'opacity-100': '1'
};

const boxSizing = {
'box-border': 'border-box',
'box-content': 'content-box',
};

styleClass('appearance', appearance, root, opts);
styleClass('outline', outline, root, opts);
styleClass('pointer-events', pointerEvents, root, opts);
styleClass('cursor', cursor, root, opts);
styleClass('user-select', userSelect, root, opts);
styleClass('opacity', opacity, root, opts);
styleClass('opacity', opacity, root, opts, true, true);
styleClass('box-sizing', boxSizing, root, opts);
}

0 comments on commit f5d31b6

Please sign in to comment.