Skip to content

Commit 0b7dbd6

Browse files
committed
Final cleanup
1 parent 7a077f3 commit 0b7dbd6

File tree

4 files changed

+39
-33
lines changed

4 files changed

+39
-33
lines changed

resources/assets/scripts/components/auth/ResetPassword.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<div class="input-open">
88
<input class="input" id="grid-email" type="email" aria-labelledby="grid-email" required
99
ref="email"
10-
v-bind:class="{ 'has-content': email.length > 0 }"
11-
v-bind:readonly="showSpinner"
10+
:class="{ 'has-content': email.length > 0 }"
11+
:readonly="showSpinner"
1212
v-on:input="updateEmailField"
1313
/>
1414
<label for="grid-email">{{ $t('strings.email') }}</label>
@@ -18,7 +18,8 @@
1818
<div class="input-open">
1919
<input class="input" id="grid-password" type="password" aria-labelledby="grid-password" required
2020
ref="password"
21-
v-bind:readonly="showSpinner"
21+
:class="{ 'has-content' : password.length > 0 }"
22+
:readonly="showSpinner"
2223
v-model="password"
2324
/>
2425
<label for="grid-password">{{ $t('strings.password') }}</label>
@@ -28,7 +29,8 @@
2829
<div class="flex flex-wrap -mx-3 mb-6">
2930
<div class="input-open">
3031
<input class="input" id="grid-password-confirmation" type="password" aria-labelledby="grid-password-confirmation" required
31-
v-bind:readonly="showSpinner"
32+
:class="{ 'has-content' : passwordConfirmation.length > 0 }"
33+
:readonly="showSpinner"
3234
v-model="passwordConfirmation"
3335
/>
3436
<label for="grid-password-confirmation">{{ $t('strings.confirm_password') }}</label>
Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,3 @@
1-
.input-open {
2-
@apply .w-full .px-3 .relative;
3-
}
4-
5-
.input-open > .input {
6-
@apply .appearance-none .block .w-full .text-grey-darker .border-b-2 .border-grey-light .py-3 .mb-3;
7-
8-
&:focus {
9-
@apply .border-blue;
10-
outline: 0;
11-
transition: border 500ms ease-out;
12-
}
13-
14-
&:focus + label, &:valid + label, &.has-content + label {
15-
@apply .text-grey-darker .px-0 .cursor-pointer;
16-
transform:translateY(-26px)
17-
}
18-
19-
&:required {
20-
box-shadow: none;
21-
}
22-
}
23-
24-
.input-open > label {
25-
@apply .block .uppercase .tracking-wide .text-grey .text-xs .mb-2 .absolute;
26-
top: 14px;
27-
transition: transform 200ms ease-out;
28-
}
29-
301
.login-box {
312
@apply .bg-white .shadow-lg .rounded-lg .pt-10 .px-8 .pb-6 .mb-4;
323
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* Styles for the login form open input boxes. Label floats up above it when content
3+
* is input and then sinks back down into the field if left empty.
4+
*/
5+
.input-open {
6+
@apply .w-full .px-3 .relative;
7+
}
8+
9+
.input-open > .input {
10+
@apply .appearance-none .block .w-full .text-grey-darker .border-b-2 .border-grey-light .py-3 .mb-3;
11+
12+
&:focus {
13+
@apply .border-blue;
14+
outline: 0;
15+
transition: border 500ms ease-out;
16+
}
17+
18+
&:focus + label, &:valid + label, &.has-content + label {
19+
@apply .text-grey-darker .px-0 .cursor-pointer;
20+
transform:translateY(-26px)
21+
}
22+
23+
&:required {
24+
box-shadow: none;
25+
}
26+
}
27+
28+
.input-open > label {
29+
@apply .block .uppercase .tracking-wide .text-grey .text-xs .mb-2 .absolute;
30+
top: 14px;
31+
transition: transform 200ms ease-out;
32+
}

resources/assets/styles/main.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
@import "components/animations.css";
1111
@import "components/authentication.css";
1212
@import "components/buttons.css";
13+
@import "components/forms.css";
1314
@import "components/notifications.css";
1415
@import "components/spinners.css";
1516

0 commit comments

Comments
 (0)