Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tweak order of outline plugins
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
  • Loading branch information
reinink and adamwathan committed Oct 26, 2021
commit 983fd1432eddfeefc2bbcf771a6aaa0058867f63
16 changes: 8 additions & 8 deletions src/corePlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,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'],
}),

outlineColor: ({ matchUtilities, theme }) => {
matchUtilities(
{
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
6 changes: 3 additions & 3 deletions tests/basic-usage.test.css
Original file line number Diff line number Diff line change
Expand Up @@ -830,15 +830,15 @@
.outline-none {
outline-style: none;
}
.outline-black {
outline-color: #000;
}
.outline-4 {
outline-width: 4px;
}
.outline-offset-2 {
outline-offset: 2px;
}
.outline-black {
outline-color: #000;
}
.ring {
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width)
var(--tw-ring-offset-color);
Expand Down