diff --git a/src/corePlugins/transitionDelay.js b/src/corePlugins/transitionDelay.js index dc9ed2e..a38696a 100644 --- a/src/corePlugins/transitionDelay.js +++ b/src/corePlugins/transitionDelay.js @@ -1,17 +1,15 @@ -const { nameClass } = require('../pluginUtils') +const { nameClass, asValue } = require('../pluginUtils') module.exports = function ({ matchUtilities, jit: { theme } }) { matchUtilities({ delay: (modifier, { theme }) => { - let value = theme.transitionDelay[modifier] + let value = asValue(modifier, theme.transitionDelay) if (value === undefined) { return [] } - return { - [nameClass('delay', modifier)]: { 'transition-delay': value }, - } + return { [nameClass('delay', modifier)]: { 'transition-delay': value } } }, }) } diff --git a/tests/arbitrary-values.test.css b/tests/arbitrary-values.test.css index fe9ffd5..25b2471 100644 --- a/tests/arbitrary-values.test.css +++ b/tests/arbitrary-values.test.css @@ -136,6 +136,9 @@ .text-\[2\.23rem\] { font-size: 2.23rem; } +.delay-\[0ms\] { + transition-delay: 0ms; +} .duration-\[2s\] { transition-duration: 2s; } diff --git a/tests/arbitrary-values.test.html b/tests/arbitrary-values.test.html index 315d533..386fa9f 100644 --- a/tests/arbitrary-values.test.html +++ b/tests/arbitrary-values.test.html @@ -43,5 +43,6 @@
+