@@ -99,25 +99,46 @@ h6:hover .anchor {
99
99
margin-bottom : 0 ;
100
100
}
101
101
102
+ input , button {
103
+ font-size : inherit ;
104
+ }
105
+
106
+ input {
107
+ min-width : 0 ; // Allow the input to shrink on small devices.
108
+ }
109
+
110
+ a .btn , // Trick to increase the specificity and win against rules such as a:visited
102
111
.btn {
103
112
text-decoration : none ;
104
113
border-radius : 3px ;
105
114
font-weight : 600 ;
106
- border : 1 px solid transparent ;
115
+ border : none ;
107
116
box-sizing : border-box ;
108
117
display : inline-block ;
109
118
padding : 0.4em 2em ;
119
+ transition : background-color 125ms ;
110
120
111
121
background-color : $brand-color ;
112
122
color : $background-color ;
113
123
border-color : $background-color ;
114
124
115
125
& :hover {
116
126
color : lighten ($background-color , 10 );
117
- border-color : $brand-color ;
127
+ background-color : lighten ($brand-color , 5 );
128
+ }
129
+
130
+ & :active {
131
+ background-color : darken ($brand-color , 5 );
118
132
}
119
133
}
120
134
135
+ input [type = email ] {
136
+ border-radius : 3px ;
137
+ border : 1px solid $brand-color ;
138
+ box-sizing : border-box ;
139
+ padding : .4em ;
140
+ }
141
+
121
142
// A hack for image captions.
122
143
// See https://stackoverflow.com/questions/19331362/using-an-image-caption-in-markdown-jekyll
123
144
img +em ,
@@ -129,13 +150,39 @@ video+em {
129
150
}
130
151
131
152
.email-form {
132
- display : flex ;
153
+ display : grid ;
154
+ margin-top : $spacing-unit ;
155
+ grid-template-columns : auto auto ;
156
+ justify-content : center ;
157
+ gap : .6em 1em ;
158
+ background-color : color-mix (in oklab , $brand-color 20% , #fff );
159
+ padding : $spacing-unit * .5 ;
160
+ align-items : center ;
161
+ border-radius : 3px ;
162
+
163
+ .email-form__icon {
164
+ width : 5em ;
165
+ height : 5em ;
166
+ --icon-stroke-color : #{$brand-color } ;
167
+ --icon-fill-color : rgba (255 , 255 , 255 , .4 );
168
+ }
133
169
134
- .email-input {
135
- margin-right : 0 px ;
170
+ .email-form__description {
171
+ max-width : 18 em ;
136
172
}
137
173
138
- .email-submit {
139
- margin-left : 0 px ;
174
+ .email-form__input {
175
+ grid-column : 1 / 3 ;
140
176
}
141
- }
177
+ }
178
+
179
+ .email-input {
180
+ display : grid ;
181
+ grid-template-columns : repeat (2 , auto );
182
+ gap : 5px ;
183
+
184
+ label {
185
+ grid-column : 1 / 3 ;
186
+ font-size : .8em ;
187
+ }
188
+ }
0 commit comments