forked from material-components/material-components-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_variables.scss
99 lines (90 loc) · 5.43 KB
/
_variables.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//
// Copyright 2017 Google Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
@import "@material/density/variables";
@import "@material/floating-label/variables";
@import "@material/notched-outline/variables";
@import "@material/theme/variables";
///
/// Returns outlined text field floating label position for given height.
///
/// @todo Instead of adjusting `$positionY` with label box height that might change based on floating label font size
/// wrap label in a child element to apply `transitionY(-50%)` to automatically offset based on box height.
///
@function mdc-text-field-get-outlined-label-position-y($text-field-height) {
@return $text-field-height/2 + $mdc-notched-outline-label-box-height/2;
}
$mdc-text-field-error: error !default;
$mdc-text-field-fullwidth-bottom-line-color: rgba(mdc-theme-prop-value(on-surface), .12) !default;
$mdc-text-field-disabled-border: rgba(mdc-theme-prop-value(on-surface), .06) !default;
$mdc-text-field-disabled-icon: rgba(mdc-theme-prop-value(on-surface), .3) !default;
$mdc-text-field-bottom-line-hover: rgba(mdc-theme-prop-value(on-surface), .87) !default;
$mdc-text-field-bottom-line-idle: rgba(mdc-theme-prop-value(on-surface), .42) !default;
$mdc-text-field-label: rgba(mdc-theme-prop-value(on-surface), .6) !default;
$mdc-text-field-ink-color: rgba(mdc-theme-prop-value(on-surface), .87) !default;
$mdc-text-field-helper-text-color: rgba(mdc-theme-prop-value(on-surface), .6) !default;
$mdc-text-field-icon-color: rgba(mdc-theme-prop-value(on-surface), .54) !default;
$mdc-text-field-focused-label-color: rgba(mdc-theme-prop-value(primary), .87) !default;
$mdc-text-field-placeholder-ink-color: rgba(mdc-theme-prop-value(on-surface), .54) !default;
$mdc-text-field-disabled-label-color: rgba(mdc-theme-prop-value(on-surface), .38) !default;
$mdc-text-field-disabled-ink-color: rgba(mdc-theme-prop-value(on-surface), .38) !default;
$mdc-text-field-disabled-placeholder-ink-color: rgba(mdc-theme-prop-value(on-surface), .38) !default;
$mdc-text-field-disabled-helper-text-color: rgba(mdc-theme-prop-value(on-surface), .38) !default;
$mdc-text-field-background: mix(mdc-theme-prop-value(on-surface), mdc-theme-prop-value(surface), 4%) !default;
$mdc-text-field-disabled-background: mix(mdc-theme-prop-value(on-surface), mdc-theme-prop-value(surface), 2%) !default;
$mdc-text-field-secondary-text: rgba(mdc-theme-prop-value(on-surface), .6) !default;
$mdc-text-field-outlined-idle-border: rgba(mdc-theme-prop-value(on-surface), .38) !default;
$mdc-text-field-outlined-disabled-border: rgba(mdc-theme-prop-value(on-surface), .06) !default;
$mdc-text-field-outlined-hover-border: rgba(mdc-theme-prop-value(on-surface), .87) !default;
$mdc-textarea-border: rgba(mdc-theme-prop-value(on-surface), .73) !default;
$mdc-textarea-background: rgba(mdc-theme-prop-value(surface), 1) !default;
$mdc-textarea-disabled-border-color: rgba(mdc-theme-prop-value(on-surface), .26) !default;
// cannot be transparent because multiline textarea input
// will make text unreadable
$mdc-textarea-disabled-background: rgba(249, 249, 249, 1) !default;
$mdc-text-field-outlined-stroke-width: 2px !default;
$mdc-text-field-height: 56px !default;
$mdc-text-field-minimum-height: 40px !default;
$mdc-text-field-maximum-height: $mdc-text-field-height !default;
$mdc-text-field-density-scale: $mdc-density-default-scale !default;
$mdc-text-field-density-config: (
height: (
default: $mdc-text-field-height,
maximum: $mdc-text-field-maximum-height,
minimum: $mdc-text-field-minimum-height,
),
) !default;
$mdc-text-field-label-position-y: $mdc-floating-label-position-y !default;
$mdc-text-field-label-offset: 16px !default;
$mdc-text-field-dense-label-position-y: 70% !default;
$mdc-text-field-dense-label-scale: .8 !default;
$mdc-text-field-outlined-label-position-y:
mdc-text-field-get-outlined-label-position-y($mdc-text-field-height) !default;
$mdc-text-field-outlined-dense-label-position-y: 120% !default;
$mdc-text-field-outlined-with-leading-icon-label-position-x: 0 !default;
$mdc-text-field-outlined-dense-with-leading-icon-label-position-x: 21px !default;
$mdc-text-field-textarea-label-position-y: 130% !default;
$mdc-text-field-helper-line-padding: 16px !default;
$mdc-text-field-input-padding: 16px !default;
$mdc-text-field-input-padding-top: 20px !default;
$mdc-text-field-input-padding-bottom: 6px !default;
$mdc-text-field-input-border-bottom: 1px !default;
// Note that the scale factor is an eyeballed approximation of what's shown in the mocks.