From d78958b9f8f419714d102f7af619af56b8446d09 Mon Sep 17 00:00:00 2001 From: jongomez Date: Thu, 28 Sep 2023 13:27:34 +0100 Subject: [PATCH] fix: error state now supported in non webkit browsers --- .../lsd-react/src/components/DateField/DateField.styles.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/lsd-react/src/components/DateField/DateField.styles.ts b/packages/lsd-react/src/components/DateField/DateField.styles.ts index 3b48bde..f505260 100644 --- a/packages/lsd-react/src/components/DateField/DateField.styles.ts +++ b/packages/lsd-react/src/components/DateField/DateField.styles.ts @@ -131,4 +131,11 @@ export const DateFieldStyles = css` .${dateFieldClasses.input}::-webkit-datetime-edit-day-field { text-decoration: line-through; } + + /* If browser does not support ::-webkit-datetime pseudo elements, use the following. */ + @supports not selector(::-webkit-datetime-edit-day-field) { + .${dateFieldClasses.error} .${dateFieldClasses.input} { + text-decoration: line-through; + } + } `