-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathstyles.css
More file actions
117 lines (109 loc) · 2.23 KB
/
Copy pathstyles.css
File metadata and controls
117 lines (109 loc) · 2.23 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/*===== GOOGLE FONTS =====*/
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap");
/*===== VARIABLES CSS =====*/
:root {
/*===== Colores =====*/
--first-color: #1A73E8;
--input-color: #80868B;
--border-color: #DADCE0;
/*===== Fuente y tipografia =====*/
--body-font: "Roboto", sans-serif;
--normal-font-size: 1rem;
--small-font-size: .75rem;
}
/*===== BASE =====*/
*, ::before, ::after {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
font-family: var(--body-font);
font-size: var(--normal-font-size);
}
h1 {
margin: 0;
}
/*===== FORM =====*/
.l-form {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.form {
width: 360px;
padding: 3rem 2rem;
border-radius: 1rem;
box-shadow: 0 10px 25px rgba(92, 99, 105, 0.2);
}
.form__title {
font-weight: 500;
margin-bottom: 2.5rem;
}
.form__div {
position: relative;
height: 52px;
margin-bottom: 1.5rem;
}
.form__input {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
font-size: var(--normal-font-size);
border: 2px solid var(--border-color);
border-radius: 0.5rem;
outline: none;
padding: 1rem;
background: none;
z-index: 1;
}
.form__label {
position: absolute;
left: 1rem;
top: 1rem;
padding: 0 0.25rem;
background-color: #fff;
color: var(--input-color);
font-size: var(--normal-font-size);
transition: 0.3s;
}
.form__button {
display: block;
margin-left: auto;
padding: 0.75rem 2rem;
outline: none;
border: none;
background-color: var(--first-color);
color: #fff;
font-size: var(--normal-font-size);
border-radius: 0.25rem;
cursor: pointer;
transition: 0.3s;
}
.form__button:hover {
box-shadow: 0 10px 36px rgba(0, 0, 0, 0.15);
}
/*Input focus move up label*/
.form__input:focus + .form__label {
top: -0.5rem;
left: 0.8rem;
color: var(--first-color);
font-size: var(--small-font-size);
font-weight: 500;
z-index: 10;
}
/*Input focus sticky top label*/
.form__input:not(:placeholder-shown).form__input:not(:focus) + .form__label {
top: -0.5rem;
left: 0.8rem;
z-index: 10;
font-size: var(--small-font-size);
font-weight: 500;
}
/*Input focus*/
.form__input:focus {
border: 2px solid var(--first-color);
}