@@ -84,7 +84,12 @@ td > a,
8484 transition : color 0.2s ;
8585
8686 /* interactions */
87- & : hover , & : focus {
87+ /* increase visiblility when focusing via keyboard */
88+ & : focus {
89+ color : var (--sky-black );
90+ text-decoration : underline;
91+ }
92+ & : hover {
8893 color : var (--sky );
8994 }
9095 & : active {
@@ -94,8 +99,7 @@ td > a,
9499 /* danger text */
95100 & .danger-text : hover ,
96101 & .danger-text : focus {
97- color : var (--danger );
98- opacity : 0.8 ; /* approximate sky color value */
102+ color : var (--danger-dark );
99103 }
100104}
101105
@@ -161,6 +165,13 @@ td > a,
161165 box-shadow : 0 2px 1em rgba (35 , 50 , 51 , 0.15 );
162166 z-index : 1 ;
163167 }
168+
169+ /* disabled state */
170+ /* NOTE: remember to also set `tabIndex="-1"` */
171+ & .is-disabled {
172+ @add-mixin disable-field;
173+ opacity : 0.3 ;
174+ }
164175}
165176
166177/* danger button */
@@ -235,6 +246,17 @@ blueprint overrides
235246 background-color: rgba(245, 245, 255, 0.7);
236247}*/
237248
249+ /* overlay in front of nav */
250+ .pt-portal ,
251+ .pt-overlay {
252+ z-index : 100 ;
253+ }
254+
255+ /* give rando div a z-index so the content isn't hidden on mobile (wtf blueprint) */
256+ .pt-overlay div : not ([class ]){
257+ z-index : 1 ;
258+ }
259+
238260.pt-input {
239261 border-radius : var (--radius-sm );
240262}
@@ -264,7 +286,8 @@ blueprint overrides
264286 } */
265287
266288 /* override blueprint disabled style */
267- & : disabled {
289+ & : disabled ,
290+ & .pt-disabled {
268291 color : var (--white ) !important ;
269292 background-color : var (--light-2 ) !important ;
270293 }
@@ -339,8 +362,8 @@ blueprint overrides
339362
340363/* fix dialog container bug */
341364.pt-dialog-container {
342- width : 100 vw ;
343- height : 100 vh ;
365+ @add-mixin absolute-expand ;
366+ position : fixed !important ;
344367}
345368
346369.pt-dialog {
@@ -352,6 +375,11 @@ blueprint overrides
352375 & .is-fullscreen {
353376 width : calc (100% - var (--gutter-lg ));
354377 height : calc (100vh - var (--gutter-lg ));
378+
379+ @add-mixin max-sm {
380+ width : calc (100% - var (--gutter-sm ));
381+ height : calc (100vh - var (--gutter-sm ));
382+ }
355383 }
356384
357385 /* center align alert contents */
@@ -556,8 +584,7 @@ label.pt-control {
556584 color : var (--sky-dark );
557585
558586 /* interactions */
559- /* NOTE: it's a div, so there's no :focus */
560- & : hover {
587+ & : hover , & : focus {
561588 color : var (--sky );
562589 }
563590 }
@@ -585,19 +612,35 @@ layout
585612----------------------------------- */
586613
587614/* fix overflow */
615+ html ,
588616body {
589- overflow-y : auto;
590617 overflow-x : hidden;
591618}
592- /* if vh units are supported, move overflow to app */
593- @supports (height : 100vh ) {
594- body {
595- overflow-y : hidden;
619+ /* behind the bottom toolbar in iOS safari */
620+ body {
621+ background-color : var (--sky-light );
622+ }
623+
624+ /* prevent double overflow scrolling when overlays are open */
625+ /* NOTE: .pt-overlay-open is automatically applied to the body element */
626+ body .pt-overlay-open ,
627+ body .pt-overlay-open # app {
628+ overflow-y : hidden !important ;
629+
630+ & .pt-overlay ,
631+ & .pt-overlay-backdrop {
632+ overflow : hidden !important ;
596633 }
597- # app {
634+
635+ & .pt-dialog {
636+ overflow-y : auto;
637+ }
638+ }
639+
640+ /* inline dialog fixes */
641+ .pt-overlay-inline {
642+ & .pt-dialog {
598643 overflow-y : auto;
599- overflow-x : hidden;
600- height : 100vh ;
601644 }
602645}
603646
@@ -925,6 +968,12 @@ form field layout
925968 @add-mixin text-input-theme;
926969 }
927970
971+ /* min font size for mobile */
972+ & .font-sm > input : not ([type = submit ]): not ([type = file ]),
973+ & .font-sm > textarea {
974+ font-size : 16px ;
975+ }
976+
928977 /* textarea min/max height */
929978 & > textarea {
930979 min-height : 11rem ;
@@ -1130,13 +1179,24 @@ form field layout
11301179 padding-top : 0.25em ;
11311180 padding-bottom : 0.375em ;
11321181 opacity : 0 ;
1182+
1183+ /* hover & focus states */
1184+ & : hover ~ .fake-file-select : after ,
1185+ & : focus ~ .fake-file-select : after {
1186+ background-color : var (--sky-black );
1187+ }
1188+
1189+ /* focus state */
1190+ & : focus ~ .fake-file-select {
1191+ background-color : var (--sky-light );
1192+ }
11331193 }
11341194 /* make real field and fake field take up width of container */
11351195 & .field-input {
11361196 width : 100% ;
11371197
11381198 /* interactions */
1139- & : hover , & : focus {
1199+ & : hover {
11401200 & ~ .fake-file-select {
11411201 background-color : var (--white );
11421202 border-color : var (--sky-dark );
@@ -1197,6 +1257,10 @@ form field layout
11971257 text-align : center;
11981258 border-radius : 1.5em ;
11991259 }
1260+ @add-mixin min-md {
1261+ border-top-right-radius : 2px ;
1262+ border-bottom-right-radius : 2px ;
1263+ }
12001264 }
12011265}
12021266
@@ -1228,6 +1292,11 @@ form field layout
12281292 @add-mixin font-md;
12291293 }
12301294
1295+ /* icon color on :focus */
1296+ & : focus-within .pt-icon-calendar {
1297+ color : var (--sky-dark );
1298+ }
1299+
12311300 /* THE PICKER */
12321301 /* offset positioning, make it stop uncentering itself */
12331302 & .pt-overlay {
@@ -1366,11 +1435,21 @@ utility classes
13661435 display : none !important ;
13671436 }
13681437}
1438+ .u-hide-above-xs {
1439+ @add-mixin min-xs {
1440+ display : none !important ;
1441+ }
1442+ }
13691443.u-hide-above-sm {
13701444 @add-mixin min-sm {
13711445 display : none !important ;
13721446 }
13731447}
1448+ .u-hide-above-md {
1449+ @add-mixin min-md {
1450+ display : none !important ;
1451+ }
1452+ }
13741453
13751454/* vertially align child content via flexbox */
13761455.u-vertical-align-children {
0 commit comments