Skip to content

Commit

Permalink
Tweak order of outline plugins
Browse files Browse the repository at this point in the history
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
  • Loading branch information
reinink and adamwathan committed Oct 26, 2021
1 parent 3999253 commit 1d4dcc6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
16 changes: 8 additions & 8 deletions src/corePlugins.js
Expand Up @@ -1790,6 +1790,14 @@ export let corePlugins = {
}
})(),

outlineWidth: createUtilityPlugin('outlineWidth', [['outline', ['outline-width']]], {
type: ['length', 'number', 'percentage'],
}),

outlineOffset: createUtilityPlugin('outlineOffset', [['outline-offset', ['outline-offset']]], {
type: ['length', 'number', 'percentage'],
}),

outlineStyle: ({ addUtilities }) => {
addUtilities({
'.outline': { 'outline-style': 'solid' },
Expand All @@ -1812,14 +1820,6 @@ export let corePlugins = {
)
},

outlineWidth: createUtilityPlugin('outlineWidth', [['outline', ['outline-width']]], {
type: ['length', 'number', 'percentage'],
}),

outlineOffset: createUtilityPlugin('outlineOffset', [['outline-offset', ['outline-offset']]], {
type: ['length', 'number', 'percentage'],
}),

ringWidth: ({ matchUtilities, addBase, addUtilities, theme }) => {
let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5')
let ringColorDefault = withAlphaValue(
Expand Down
4 changes: 2 additions & 2 deletions stubs/defaultConfig.stub.js
Expand Up @@ -701,14 +701,14 @@ module.exports = {
placeholderColor: ({ theme }) => theme('colors'),
placeholderOpacity: ({ theme }) => theme('opacity'),
outlineColor: ({ theme }) => theme('colors'),
outlineWidth: {
outlineOffset: {
0: '0px',
1: '1px',
2: '2px',
4: '4px',
8: '8px',
},
outlineOffset: {
outlineWidth: {
0: '0px',
1: '1px',
2: '2px',
Expand Down
12 changes: 6 additions & 6 deletions tests/arbitrary-values.test.css
Expand Up @@ -859,12 +859,6 @@
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
var(--tw-shadow);
}
.outline-\[black\] {
outline-color: black;
}
.outline-\[color\:var\(--outline\)\] {
outline-color: var(--outline);
}
.outline-\[10px\] {
outline-width: 10px;
}
Expand All @@ -874,6 +868,12 @@
.outline-offset-\[10px\] {
outline-offset: 10px;
}
.outline-\[black\] {
outline-color: black;
}
.outline-\[color\:var\(--outline\)\] {
outline-color: var(--outline);
}
.ring-\[10px\] {
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width)
var(--tw-ring-offset-color);
Expand Down
12 changes: 6 additions & 6 deletions tests/basic-usage.test.css
Expand Up @@ -821,6 +821,12 @@
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
var(--tw-shadow);
}
.outline-4 {
outline-width: 4px;
}
.outline-offset-2 {
outline-offset: 2px;
}
.outline {
outline-style: solid;
}
Expand All @@ -833,12 +839,6 @@
.outline-black {
outline-color: #000;
}
.outline-4 {
outline-width: 4px;
}
.outline-offset-2 {
outline-offset: 2px;
}
.ring {
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width)
var(--tw-ring-offset-color);
Expand Down

0 comments on commit 1d4dcc6

Please sign in to comment.