Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ring defaults #405

Merged
merged 1 commit into from Apr 26, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
5 changes: 2 additions & 3 deletions __snapshots__/plugin.test.js.snap
Expand Up @@ -7837,8 +7837,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 Expand Up @@ -12560,7 +12560,6 @@ tw\`z-auto\`
exports[`twin.macro pluginForms.js: pluginForms.js 1`] = `

import { GlobalStyles } from './macro'

;<GlobalStyles />

↓ ↓ ↓ ↓ ↓ ↓
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