@@ -77,8 +77,11 @@ fieldset.form-field legend {
7777 /* color: transparent; */
7878 user-select : none;
7979}
80- fieldset .form-field input , fieldset .form-field select {
81- --mw-calc-input-height : calc (var (--mw-input-height ) - var (--label-size ) + 2 * var (--mw-border-width ));
80+ fieldset .form-field input ,
81+ fieldset .form-field select {
82+ --mw-calc-input-height : calc (
83+ var (--mw-input-height ) - var (--label-size ) + 2 * var (--mw-border-width )
84+ );
8285 box-sizing : border-box;
8386 font-size : var (--font-size );
8487 padding : 0 ;
@@ -99,11 +102,12 @@ fieldset.form-field select {
99102 /* margin: 0; */
100103 padding-left : calc (var (--mw-padding-left ) - var (--label-padding ));
101104 /* background-color: #f005 !important; */
105+ z-index : 2 ;
102106}
103107fieldset .form-field select option {
104108 background-color : black;
105109 color : white;
106- }
110+ }
107111fieldset .form-field input ::placeholder {
108112 color : var (--mw-idle-color );
109113 font-size : var (--font-size );
@@ -117,10 +121,12 @@ fieldset.form-field label {
117121 user-select : none;
118122 color : transparent;
119123 /* color: green; */
124+ z-index : 1 ; /* for not blocking klicks */
125+ pointer-events : none;
120126}
121127/*--- idle animated */
122128fieldset .form-field .animated legend ::before {
123- content : "" ;
129+ content : '' ;
124130 position : absolute;
125131 display : block;
126132 width : calc (100% - var (--mw-border-radius ));
@@ -141,13 +147,21 @@ fieldset.form-field.animated label {
141147 position : absolute;
142148 left : calc (var (--input-padding-x ) - var (--mw-border-width ));
143149 font-size : var (--font-size );
144- transition : font-size var (--animation-duration ), transform var (--animation-duration ), opacity var (--animation-duration ) step-end;
150+ transition :
151+ font-size var (--animation-duration ),
152+ transform var (--animation-duration ),
153+ opacity var (--animation-duration ) step-end;
145154}
146155/*--- idle animated populated */
147- fieldset .form-field .animated : has (input : not (: placeholder-shown )) legend ::before { width : 0 ; }
148- fieldset .form-field .animated : has (input : not (: placeholder-shown )) legend { color : var (--mw-idle-color ); }
149- fieldset .form-field .animated : has (input : not (: placeholder-shown )) label { color : transparent; }
150-
156+ fieldset .form-field .animated : has (input : not (: placeholder-shown )) legend ::before {
157+ width : 0 ;
158+ }
159+ fieldset .form-field .animated : has (input : not (: placeholder-shown )) legend {
160+ color : var (--mw-idle-color );
161+ }
162+ fieldset .form-field .animated : has (input : not (: placeholder-shown )) label {
163+ color : transparent;
164+ }
151165
152166/*===== hovered */
153167fieldset .form-field : hover {
@@ -159,9 +173,13 @@ fieldset.form-field:hover legend::before {
159173 border-width : var (--mw-hover-border-width );
160174 border-color : var (--mw-hover-color );
161175}
162- fieldset .form-field : hover legend { color : var (--mw-hover-color ); }
176+ fieldset .form-field : hover legend {
177+ color : var (--mw-hover-color );
178+ }
163179/* hovered animated */
164- fieldset .form-field .animated : hover legend { color : transparent; }
180+ fieldset .form-field .animated : hover legend {
181+ color : transparent;
182+ }
165183fieldset .form-field .animated : has (input : placeholder-shown ): hover input ::placeholder {
166184 color : transparent;
167185}
@@ -172,7 +190,10 @@ fieldset.form-field.animated:hover label {
172190 /* color: transparent; */
173191 color : var (--mw-hover-color );
174192 left : calc (var (--input-padding-x ) - var (--mw-hover-border-width ));
175- top : calc (0.5 * var (--mw-input-height ) - var (--label-size ) * 0.5 - var (--font-size ) + var (--mw-hover-border-width ));
193+ top : calc (
194+ 0.5 * var (--mw-input-height ) - var (--label-size ) * 0.5 - var (--font-size ) +
195+ var (--mw-hover-border-width )
196+ );
176197}
177198
178199/*===== focused */
@@ -185,13 +206,25 @@ fieldset.form-field:focus-within legend::before {
185206 border-width : var (--mw-focus-border-width );
186207 border-color : var (--mw-focus-color );
187208}
188- fieldset .form-field : focus-within legend { color : var (--mw-focus-color ); }
189- fieldset .form-field select : focus { color : var (--mw-focus-color ); }
209+ fieldset .form-field : focus-within legend {
210+ color : var (--mw-focus-color );
211+ }
212+ fieldset .form-field select : focus {
213+ color : var (--mw-focus-color );
214+ }
190215/* focused animated */
191- fieldset .form-field .animated : focus-within legend ::before { width : 0 ; }
192- fieldset .form-field .animated : focus-within legend { color : var (--mw-focus-color ); }
193- fieldset .form-field .animated : has (input : not (: placeholder-shown )): focus-within legend { color : var (--mw-focus-color ); }
194- fieldset .form-field .animated : focus-within input ::placeholder { color : transparent }
216+ fieldset .form-field .animated : focus-within legend ::before {
217+ width : 0 ;
218+ }
219+ fieldset .form-field .animated : focus-within legend {
220+ color : var (--mw-focus-color );
221+ }
222+ fieldset .form-field .animated : has (input : not (: placeholder-shown )): focus-within legend {
223+ color : var (--mw-focus-color );
224+ }
225+ fieldset .form-field .animated : focus-within input ::placeholder {
226+ color : transparent;
227+ }
195228fieldset .form-field .animated : focus-within label {
196229 color : transparent;
197230 left : calc (var (--input-padding-x ) - var (--mw-hover-border-width ));
@@ -212,7 +245,7 @@ fieldset.form-field.animated label {
212245 font-size: var(--label-size);
213246 transform: translateY(var(--distY)) translateX(var(--input-padding-x));
214247 transition: font-size var(--animation-duration), transform var(--animation-duration), opacity 0s;
215- }
248+ }
216249fieldset.form-field.animated:focus-within legend::before,
217250fieldset.form-field.animated:has(input:not(:placeholder-shown)) legend::before {
218251 border-top: var(--mw-focus-border-width) solid var(--mw-focus-color);
@@ -233,8 +266,10 @@ fieldset.form-field[disabled]:hover {
233266 cursor : not-allowed;
234267 padding : 0 calc (var (--mw-inset ) - var (--mw-border-width ));
235268}
236- fieldset .form-field [disabled ] input { cursor : not-allowed; }
237- fieldset .form-field [disabled ] legend ,
269+ fieldset .form-field [disabled ] input {
270+ cursor : not-allowed;
271+ }
272+ fieldset .form-field [disabled ] legend ,
238273fieldset .form-field [disabled ] input ::placeholder {
239274 color : var (--mw-disabled-color );
240275 cursor : not-allowed;
@@ -243,8 +278,11 @@ fieldset.form-field[disabled] input {
243278 height : calc (var (--mw-input-height ) - var (--label-size ) + 2 * var (--mw-border-width ));
244279 margin-top : calc (-1 * var (--half-lbl ));
245280}
246- fieldset .form-field [disabled ]: hover { border-width : var (--mw-border-width ); }
247- fieldset .form-field [disabled ]: hover input , fieldset .form-field [disabled ]: hover select {
281+ fieldset .form-field [disabled ]: hover {
282+ border-width : var (--mw-border-width );
283+ }
284+ fieldset .form-field [disabled ]: hover input ,
285+ fieldset .form-field [disabled ]: hover select {
248286 padding-left : calc (var (--mw-padding-left ) - var (--mw-border-width ));
249287}
250288fieldset .form-field [disabled ]: hover legend {
@@ -259,5 +297,9 @@ fieldset.form-field[disabled] label {
259297}
260298
261299/* special: required */
262- fieldset .form-field : has ([required ]) legend ::after { content : " *" ; }
263- fieldset .form-field : has ([required ]) label ::after { content : " *" ; }
300+ fieldset .form-field : has ([required ]) legend ::after {
301+ content : ' *' ;
302+ }
303+ fieldset .form-field : has ([required ]) label ::after {
304+ content : ' *' ;
305+ }
0 commit comments