Skip to content

Commit

Permalink
Merge pull request #405 from ben-rogerson/feature/ring-defaults
Browse files Browse the repository at this point in the history
Ring defaults
  • Loading branch information
ben-rogerson committed Apr 26, 2021
2 parents 4e03876 + b0f443a commit 7afbfe2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions __fixtures__/globalStyles/tailwind.config.js
Expand Up @@ -12,6 +12,12 @@ module.exports = {
400: 'grayish',
},
},
ringOffsetWidth: {
DEFAULT: '10px',
},
ringOffsetColor: {
DEFAULT: 'rainbow',
},
borderColor: {
// Tests the dynamic default border default color
DEFAULT: 'blueish',
Expand Down
4 changes: 2 additions & 2 deletions __snapshots__/plugin.test.js.snap
Expand Up @@ -7971,8 +7971,8 @@ const _GlobalStyles = () => (
}
* {
--tw-ring-inset: var(--tw-empty, /*!*/ /*!*/);
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-offset-width: 10px;
--tw-ring-offset-color: rainbow;
--tw-ring-color: rgba(59, 130, 246, 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/ring.js
Expand Up @@ -16,8 +16,8 @@ export const globalRingStyles = ({ theme }) => {

return `* {
--tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-offset-width: ${theme('ringOffsetWidth.DEFAULT') || '0px'};
--tw-ring-offset-color: ${theme('ringOffsetColor.DEFAULT') || '#fff'};
--tw-ring-color: ${ringColorDefault};
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
Expand Down

0 comments on commit 7afbfe2

Please sign in to comment.