From 03d71c311991fc94934e5d34b17bc8a399e93c08 Mon Sep 17 00:00:00 2001 From: Louis-Maxime Piton Date: Fri, 27 Oct 2023 08:18:41 +0200 Subject: [PATCH] Dark mode: Form Validation (#2302) --- scss/_root.scss | 6 ++ scss/_variables-dark.scss | 18 ++++- scss/_variables.scss | 1 + scss/mixins/_forms.scss | 1 + site/content/docs/5.3/dark-mode.md | 119 ++++++++++++++++++++++++++++- 5 files changed, 140 insertions(+), 5 deletions(-) diff --git a/scss/_root.scss b/scss/_root.scss index 3684f7bd8d..4776bff64f 100644 --- a/scss/_root.scss +++ b/scss/_root.scss @@ -198,6 +198,12 @@ --#{$prefix}#{$color}-border-subtle: #{$value}; } + // Boosted mod + @each $icon, $svg in $svg-as-custom-props-dark { + --#{$prefix}#{$icon}-icon: #{escape-svg($svg)}; + } + // End mod + --#{$prefix}heading-color: #{$headings-color-dark}; --#{$prefix}link-color: #{$link-color-dark}; diff --git a/scss/_variables-dark.scss b/scss/_variables-dark.scss index 501db9f13f..abd521b9bf 100644 --- a/scss/_variables-dark.scss +++ b/scss/_variables-dark.scss @@ -94,6 +94,16 @@ $disabled-filter-dark: brightness(0) invert(1) brightness(.4) !default; // Boos $focus-visible-inner-color-dark: $black !default; // Boosted mod $focus-visible-outer-color-dark: $white !default; // Boosted mod +$success-icon-dark: url("data:image/svg+xml,") !default; // Boosted mod +$danger-icon-dark: url("data:image/svg+xml,") !default; // Boosted mod + +// Boosted mod +$svg-as-custom-props-dark: ( + "success": $success-icon-dark, + "error": $danger-icon-dark +) !default; +// End mod + // // Forms // @@ -106,10 +116,10 @@ $form-select-disabled-indicator-dark: escape-svg(url("data:image/svg+xml, -### Labels, required fields & text +### Labels, fields & text

No theme

@@ -3272,3 +3272,120 @@ sitemap_exclude: true + +### Form validation + +

No theme

+ +
+ + + + +
+
+
+
+
+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+
+ +

Dark theme on container

+ +
+ + + + +
+
+
+
+
+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+
+ +

Light theme on container

+ +
+ + + + +
+
+
+
+
+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+
+ +

Dark theme on component

+ +
+ + + + +
+
+
+
+
+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+
+ +

Light theme on component

+ +
+ + + + +
+
+
+
+
+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+

Invalid feedback

+