Skip to content

Commit 1d4dcc6

Browse files
reininkadamwathan
andcommitted
Tweak order of outline plugins
Co-Authored-By: Adam Wathan <[email protected]>
1 parent 3999253 commit 1d4dcc6

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

src/corePlugins.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1790,6 +1790,14 @@ export let corePlugins = {
17901790
}
17911791
})(),
17921792

1793+
outlineWidth: createUtilityPlugin('outlineWidth', [['outline', ['outline-width']]], {
1794+
type: ['length', 'number', 'percentage'],
1795+
}),
1796+
1797+
outlineOffset: createUtilityPlugin('outlineOffset', [['outline-offset', ['outline-offset']]], {
1798+
type: ['length', 'number', 'percentage'],
1799+
}),
1800+
17931801
outlineStyle: ({ addUtilities }) => {
17941802
addUtilities({
17951803
'.outline': { 'outline-style': 'solid' },
@@ -1812,14 +1820,6 @@ export let corePlugins = {
18121820
)
18131821
},
18141822

1815-
outlineWidth: createUtilityPlugin('outlineWidth', [['outline', ['outline-width']]], {
1816-
type: ['length', 'number', 'percentage'],
1817-
}),
1818-
1819-
outlineOffset: createUtilityPlugin('outlineOffset', [['outline-offset', ['outline-offset']]], {
1820-
type: ['length', 'number', 'percentage'],
1821-
}),
1822-
18231823
ringWidth: ({ matchUtilities, addBase, addUtilities, theme }) => {
18241824
let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5')
18251825
let ringColorDefault = withAlphaValue(

stubs/defaultConfig.stub.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -701,14 +701,14 @@ module.exports = {
701701
placeholderColor: ({ theme }) => theme('colors'),
702702
placeholderOpacity: ({ theme }) => theme('opacity'),
703703
outlineColor: ({ theme }) => theme('colors'),
704-
outlineWidth: {
704+
outlineOffset: {
705705
0: '0px',
706706
1: '1px',
707707
2: '2px',
708708
4: '4px',
709709
8: '8px',
710710
},
711-
outlineOffset: {
711+
outlineWidth: {
712712
0: '0px',
713713
1: '1px',
714714
2: '2px',

tests/arbitrary-values.test.css

+6-6
Original file line numberDiff line numberDiff line change
@@ -859,12 +859,6 @@
859859
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
860860
var(--tw-shadow);
861861
}
862-
.outline-\[black\] {
863-
outline-color: black;
864-
}
865-
.outline-\[color\:var\(--outline\)\] {
866-
outline-color: var(--outline);
867-
}
868862
.outline-\[10px\] {
869863
outline-width: 10px;
870864
}
@@ -874,6 +868,12 @@
874868
.outline-offset-\[10px\] {
875869
outline-offset: 10px;
876870
}
871+
.outline-\[black\] {
872+
outline-color: black;
873+
}
874+
.outline-\[color\:var\(--outline\)\] {
875+
outline-color: var(--outline);
876+
}
877877
.ring-\[10px\] {
878878
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width)
879879
var(--tw-ring-offset-color);

tests/basic-usage.test.css

+6-6
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,12 @@
821821
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
822822
var(--tw-shadow);
823823
}
824+
.outline-4 {
825+
outline-width: 4px;
826+
}
827+
.outline-offset-2 {
828+
outline-offset: 2px;
829+
}
824830
.outline {
825831
outline-style: solid;
826832
}
@@ -833,12 +839,6 @@
833839
.outline-black {
834840
outline-color: #000;
835841
}
836-
.outline-4 {
837-
outline-width: 4px;
838-
}
839-
.outline-offset-2 {
840-
outline-offset: 2px;
841-
}
842842
.ring {
843843
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width)
844844
var(--tw-ring-offset-color);

0 commit comments

Comments
 (0)