@@ -99,25 +99,46 @@ h6:hover .anchor {
9999 margin-bottom : 0 ;
100100}
101101
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
102111.btn {
103112 text-decoration : none ;
104113 border-radius : 3px ;
105114 font-weight : 600 ;
106- border : 1 px solid transparent ;
115+ border : none ;
107116 box-sizing : border-box ;
108117 display : inline-block ;
109118 padding : 0.4em 2em ;
119+ transition : background-color 125ms ;
110120
111121 background-color : $brand-color ;
112122 color : $background-color ;
113123 border-color : $background-color ;
114124
115125 & :hover {
116126 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 );
118132 }
119133}
120134
135+ input [type = email ] {
136+ border-radius : 3px ;
137+ border : 1px solid $brand-color ;
138+ box-sizing : border-box ;
139+ padding : .4em ;
140+ }
141+
121142// A hack for image captions.
122143// See https://stackoverflow.com/questions/19331362/using-an-image-caption-in-markdown-jekyll
123144img +em ,
@@ -129,13 +150,39 @@ video+em {
129150}
130151
131152.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+ }
133169
134- .email-input {
135- margin-right : 0 px ;
170+ .email-form__description {
171+ max-width : 18 em ;
136172 }
137173
138- .email-submit {
139- margin-left : 0 px ;
174+ .email-form__input {
175+ grid-column : 1 / 3 ;
140176 }
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