|
10 | 10 | margin: 15px 0; |
11 | 11 | } |
12 | 12 |
|
13 | | -pre > code { |
| 13 | +pre>code { |
14 | 14 | // To avoid grey background on code blocks. |
15 | 15 | background-color: inherit; |
16 | 16 | } |
@@ -99,31 +99,90 @@ h6:hover .anchor { |
99 | 99 | margin-bottom: 0; |
100 | 100 | } |
101 | 101 |
|
102 | | -a.btn { |
| 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 |
| 111 | +.btn { |
103 | 112 | text-decoration: none; |
104 | 113 | border-radius: 3px; |
105 | 114 | font-weight: 600; |
106 | | - border: 1px 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 | | -img + em, |
124 | | -a:first-child + em:last-child, |
125 | | -video + em { |
| 144 | +img+em, |
| 145 | +a:first-child+em:last-child, |
| 146 | +video+em { |
126 | 147 | display: block; |
127 | 148 | text-align: center; |
128 | 149 | color: $grey-color; |
129 | 150 | } |
| 151 | + |
| 152 | +.email-form { |
| 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 | + } |
| 169 | + |
| 170 | + .email-form__description { |
| 171 | + max-width: 18em; |
| 172 | + } |
| 173 | + |
| 174 | + .email-form__input { |
| 175 | + grid-column: 1 / 3; |
| 176 | + } |
| 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