From a5425abd86bcd634e1194dc3314e781173d30189 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Tue, 7 Sep 2021 21:12:57 -0400 Subject: [PATCH] Support `any` arbitrary value for accentColor --- src/plugins/accentColor.js | 2 +- tests/arbitrary-values.test.css | 6 ++++++ tests/arbitrary-values.test.html | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugins/accentColor.js b/src/plugins/accentColor.js index de8c5958e..5bb0b800d 100644 --- a/src/plugins/accentColor.js +++ b/src/plugins/accentColor.js @@ -12,7 +12,7 @@ export default function () { { values: flattenColorPalette(theme('accentColor')), variants: variants('accentColor'), - type: 'color', + type: ['color', 'any'], } ) } diff --git a/tests/arbitrary-values.test.css b/tests/arbitrary-values.test.css index 62781a5d0..f2dd54d4e 100644 --- a/tests/arbitrary-values.test.css +++ b/tests/arbitrary-values.test.css @@ -333,6 +333,12 @@ .placeholder-opacity-\[var\(--placeholder-opacity\)\]::placeholder { --tw-placeholder-opacity: var(--placeholder-opacity); } +.accent-\[\#bada55\] { + accent-color: #bada55; +} +.accent-\[var\(--accent-color\)\] { + accent-color: var(--accent-color); +} .opacity-\[var\(--opacity\)\] { opacity: var(--opacity); } diff --git a/tests/arbitrary-values.test.html b/tests/arbitrary-values.test.html index 92a5b29c8..cce467662 100644 --- a/tests/arbitrary-values.test.html +++ b/tests/arbitrary-values.test.html @@ -117,6 +117,8 @@
+
+