From f5f3a23a8bda9c97f4bf9843d02348513659a8ca Mon Sep 17 00:00:00 2001 From: Cosmin Popovici Date: Sat, 30 Dec 2023 19:52:30 +0200 Subject: [PATCH] feat: add mso-shadow-color utility --- src/index.js | 17 +++++++++++++++++ src/index.test.js | 26 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/src/index.js b/src/index.js index 8e1de48..6763056 100644 --- a/src/index.js +++ b/src/index.js @@ -602,6 +602,23 @@ const tailwindCssMsoPlugin = plugin.withOptions( } ) + // mso-shadow-color + matchUtilities( + { + 'mso-shadow-color': value => ({ + 'mso-shadow-color': value + }), + }, + { + values: { + auto: 'auto', + windowtext: 'windowtext', + ...flattenColorPalette(theme('colors')), + }, + respectImportant, + } + ) + // mso-element-frame-vspace, mso-element-frame-hspace matchUtilities( { diff --git a/src/index.test.js b/src/index.test.js index 91a0685..da1cb3d 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -869,6 +869,32 @@ test('mso-shading', () => { }) }) +test('mso-shadow-color', () => { + const config = { + content: [{ + raw: String.raw` +
+
+
+ ` + }], + } + + return run(config).then(result => { + expect(result.css).toMatchCss(String.raw` + .mso-shadow-color-\[\#ffcc00\] { + mso-shadow-color: #ffcc00 + } + .mso-shadow-color-auto { + mso-shadow-color: auto + } + .mso-shadow-color-red-200 { + mso-shadow-color: #fecaca + } + `) + }) +}) + test('mso-element-frame-{v|h}space', () => { const config = { content: [{