UNPKG

891 BSCSSView Raw
1@use 'sass:map';
2@use '../theming/theming';
3
4// Renders a gradient for showing the dashed line when the input is disabled.
5// Unlike using a border, a gradient allows us to adjust the spacing of the dotted line
6// to match the Material Design spec.
7@mixin private-control-disabled-underline($color) {
8 background-image: linear-gradient(to right, $color 0%, $color 33%, transparent 0%);
9 background-size: 4px 100%;
10 background-repeat: repeat-x;
11}
12
13// Figures out the color of the placeholder for a form control.
14// Used primarily to prevent the various form controls from
15// becoming out of sync since these colors aren't in a palette.
16@function private-control-placeholder-color($config) {
17 $foreground: map.get($config, foreground);
18 $is-dark-theme: map.get($config, is-dark);
19 @return theming.get-color-from-palette($foreground, secondary-text,
20 if($is-dark-theme, 0.5, 0.42));
21}