33
44label {
55 display : block ;
6- font-size : $input -font-size ;
6+ font-size : $tff -font-size ;
77}
88
99textarea ,
@@ -23,61 +23,113 @@ input[type="tel"],
2323input [type = " color" ] {
2424 display : block ;
2525 border-width : 0 0 1px 0 ;
26- line-height : $input -line-height ;
27- font-size : $input -font-size ;
26+ line-height : $tff -line-height ;
27+ font-size : $tff -font-size ;
2828
2929 & :focus {
3030 outline : 0 ;
3131 }
3232}
3333
3434input , textarea {
35- @include input-placeholder ($input -placeholder-color );
35+ @include input-placeholder ($tff -placeholder-color );
3636 background : none ;
3737}
3838
39+ // Light-Theme
3940material-input-group ,
4041.material-input-group {
41- margin : $input-group -margin ;
42+ margin : $tff -margin ;
4243
4344 position : relative ;
45+ display : block ;
4446
45- input , textarea {
46- @include transition ($input-label-transition );
47+ label {
48+ z-index : 1 ;
49+ pointer-events : none ;
50+ -webkit-font-smoothing : antialiased ;
4751
48- color : $input-color ;
52+ & :hover {
53+ cursor : text ;
54+ }
4955 }
5056
51- & .material-input-group-inverted {
52- input {
53- color : $input-color-inverted ;
57+ @include text-hint ( $tff-hint-normal , large , $tff-transition );
58+ @include text-field ( $tff-input-normal , $tff-line-normal , $tff-transition );
59+
60+
61+ & .material-input-focused {
62+ @include text-hint ( $tff-hint-focused , small );
63+ @include text-field ( $tff-input-normal ,$tff-line-focused , false, $tff-line-focused-width );
64+ }
65+
66+ & .material-input-has-value {
67+ @include text-hint ( $tff-hint-focused , small );
68+
69+ & :not (.material-input-focused ) {
70+ @include text-hint ( $tff-hint-normal , small );
5471 }
5572 }
5673
57- label {
58- -webkit-font-smoothing : antialiased ;
59- z-index : 1 ;
60- pointer-events : none ;
74+ & [disabled ] {
6175
62- @include transform-translate3d (0 , $input-line-height , 0 );
63- @include transform-origin (left , center );
64- @include transition ($input-label-transition );
76+ @include text-field ( $tff-input-disabled , $tff-line-disabled , false, $tff-line-disabled-width );
77+ input , textarea {
78+ @include dashed-border ( $tff-line-dot-width , $tff-line-dot-width , $tff-line-dot-width , $tff-line-dashed , bottom );
79+ pointer-events : none ;
80+ tabindex : -1 ;
81+ }
6582
66- color : $input-placeholder-color ;
83+ @include text-hint ( $tff-hint-disabled , small ) ;
6784
68- & :hover {
69- cursor : text ;
85+ * :not ( .material-input-has-value ) {
86+ @include text-hint ( $tff-hint-disabled , large ) ;
7087 }
88+
89+ }
90+
91+ }
92+
93+
94+ // Dark Theme
95+ .dark material-input-group ,
96+ .dark .material-input-group {
97+
98+ @include text-hint ( $tff-hint-normal-dark , large , $tff-transition );
99+ @include text-field ( $tff-input-normal-dark , $tff-line-normal-dark , $tff-transition );
100+
101+
102+ & .material-input-focused {
103+ @include text-hint ( $tff-hint-focused-dark , small );
104+ @include text-field ( $tff-input-focused-dark ,$tff-line-focused-dark , false, $tff-line-focused-width );
71105 }
72106
73- & .material-input-focused , & .material-input-has-value {
107+ & .material-input-has-value {
108+ @include text-hint ( $tff-hint-focused-dark , small );
74109
75- input {
76- border-bottom-width : 2 px ;
110+ & :not ( .material- input-focused ) {
111+ @include text-hint ( $tff-hint-normal-dark , small ) ;
77112 }
113+ }
114+
115+ & [disabled ] {
116+
117+ @include text-field ( $tff-input-disabled-dark , $tff-line-disabled-dark , false, $tff-line-disabled-width );
118+ input , textarea {
119+ @include dashed-border ( $tff-line-dot-width , $tff-line-dot-width , $tff-line-dot-width , $tff-line-dashed-dark , bottom );
120+ pointer-events : none ;
121+ tabindex : -1 ;
122+ }
123+
124+ @include text-hint ( $tff-hint-disabled-dark , small );
78125
79- label {
80- @include transform-translate3d-scale ( 0 , 0 , 0 , $input-focused-scale );
126+ * :not ( .material-input-has-value ) {
127+ @include text-hint ( $tff-hint-disabled-dark , large );
81128 }
129+
82130 }
131+
83132}
133+
134+
135+ .theme-dark-tff { @include theme-bg-and-color (#333 , #999 ); }
0 commit comments