@@ -21,10 +21,13 @@ $rmd-theme-default-contrast-ratio: 3 !default;
2121/// color variables in react md.
2222///
2323/// @example scss - Better Contrast Enabled
24- /// $rmd-theme-better-contrast-colors : true;
25- /// $rmd-theme-primary : $rmd-teal-500 ;
26- /// $rmd-theme-secondary : $rmd-pink-a-200 ;
27- /// // OVERRIDE_VARIABLES
24+ /// @use "@react-md/theme/dist/color-palette" as colors;
25+ /// @use "react-md" as * with (
26+ /// $rmd-theme-better-contrast-colors: true,
27+ /// $rmd-theme-primary: colors.$rmd-teal-500,
28+ /// $rmd-theme-secondary: colors.$rmd-pink-a-200,
29+ /// );
30+ /// // OVERRIDE_USE
2831///
2932/// // these are the rmd-defaults
3033/// // $rmd-theme-on-primary: rmd-theme-best-contrast-color($rmd-theme-primary) !default;
@@ -40,10 +43,13 @@ $rmd-theme-default-contrast-ratio: 3 !default;
4043/// }
4144///
4245/// @example scss - Better Contrast Disabled
43- /// $rmd-theme-better-contrast-colors : false;
44- /// $rmd-theme-primary : $rmd-teal-500 ;
45- /// $rmd-theme-secondary : $rmd-pink-a-200 ;
46- /// // OVERRIDE_VARIABLES
46+ /// @use "@react-md/theme/dist/color-palette" as colors;
47+ /// @use "react-md" as * with (
48+ /// $rmd-theme-better-contrast-colors: false,
49+ /// $rmd-theme-primary: colors.$rmd-teal-500,
50+ /// $rmd-theme-secondary: colors.$rmd-pink-a-200,
51+ /// );
52+ /// // OVERRIDE_USE
4753///
4854/// // these are the rmd-defaults
4955/// // $rmd-theme-on-primary: rmd-theme-best-contrast-color($rmd-theme-primary) !default;
@@ -251,10 +257,13 @@ $rmd-theme-linear-channel-values: (
251257/// to the dark color.
252258///
253259/// @example scss - Better Contrast Enabled
254- /// $rmd-theme-better-contrast-colors : true;
255- /// $rmd-theme-primary : $rmd-teal-500 ;
256- /// $rmd-theme-secondary : $rmd-pink-a-200 ;
257- /// // OVERRIDE_VARIABLES
260+ /// @use "@react-md/theme/dist/color-palette" as colors;
261+ /// @use "react-md" as * with (
262+ /// $rmd-theme-better-contrast-colors: true,
263+ /// $rmd-theme-primary: colors.$rmd-teal-500,
264+ /// $rmd-theme-secondary: colors.$rmd-pink-a-200,
265+ /// );
266+ /// // OVERRIDE_USE
258267///
259268/// // these are the rmd-defaults
260269/// // $rmd-theme-on-primary: rmd-theme-best-contrast-color($rmd-theme-primary) !default;
@@ -264,17 +273,19 @@ $rmd-theme-linear-channel-values: (
264273/// --p: #{$rmd-theme-primary};
265274/// --s: #{$rmd-theme-secondary};
266275///
267- /// // this should be `#000` once compiled since `#000` has a 5.3 contrast
268- /// // ratio compared to teal while `#fff` has a 3.6 contrast ratio.
276+ /// // since black has a ~5.3 color ratio as compared to white with ~3.6
269277/// --op: #{$rmd-theme-on-primary};
270278/// --os: #{$rmd-theme-on-secondary};
271279/// }
272280///
273281/// @example scss - Better Contrast Disabled
274- /// $rmd-theme-better-contrast-colors : false;
275- /// $rmd-theme-primary : $rmd-teal-500 ;
276- /// $rmd-theme-secondary : $rmd-pink-a-200 ;
277- /// // OVERRIDE_VARIABLES
282+ /// @use "@react-md/theme/dist/color-palette" as colors;
283+ /// @use "react-md" as * with (
284+ /// $rmd-theme-better-contrast-colors: false,
285+ /// $rmd-theme-primary: colors.$rmd-teal-500,
286+ /// $rmd-theme-secondary: colors.$rmd-pink-a-200,
287+ /// );
288+ /// // OVERRIDE_USE
278289///
279290/// // these are the rmd-defaults
280291/// // $rmd-theme-on-primary: rmd-theme-best-contrast-color($rmd-theme-primary) !default;
@@ -284,9 +295,8 @@ $rmd-theme-linear-channel-values: (
284295/// --p: #{$rmd-theme-primary};
285296/// --s: #{$rmd-theme-secondary};
286297///
287- /// // this should be `#fff` once compiled since the light color (`#fff`)
288- /// // is checked first and meets the minimum contrast ratio requirements
289- /// // at `3.6`
298+ /// // white has a ~3.6 color ratio so it _is_ contrast compliant with the
299+ /// // minimal contrast ratios even though black would be ~5.6
290300/// --op: #{$rmd-theme-on-primary};
291301/// --os: #{$rmd-theme-on-secondary};
292302/// }
0 commit comments