@@ -283,6 +283,274 @@ Add the correct display in Chrome and Safari.
283283summary {
284284 display : list-item;
285285}
286+ html {
287+ height : 100% ;
288+ line-height : 1.4 ;
289+ }
290+
291+ h1 ,
292+ h2 ,
293+ h3 {
294+ line-height : 1.15 ;
295+ }
296+
297+ body {
298+ min-height : 100% ;
299+ overflow-wrap : break-word;
300+ }
301+
302+ main {
303+ flex-grow : 1 ;
304+ }
305+
306+ img {
307+ max-width : 100% ;
308+ max-height : 100vh ;
309+ }
310+
311+ table {
312+ display : block;
313+ overflow-x : auto;
314+ }
315+
316+ pre {
317+ padding : 1rem ;
318+ overflow-x : auto;
319+ line-height : 1.15 ;
320+ }
321+
322+ code {
323+ padding : 0.25rem ;
324+ }
325+
326+ pre code {
327+ padding : unset;
328+ }
329+
330+ kbd {
331+ display : inline-flex;
332+ align-items : center;
333+ justify-content : center;
334+ min-width : 1.5rem ;
335+ max-width : calc (100% - 0.1rem * 2 );
336+ min-height : 1.5rem ;
337+ padding : 0 0.25rem ;
338+ margin : 0 0.1rem ;
339+ overflow : hidden;
340+ }
341+
342+ kbd kbd {
343+ min-width : unset;
344+ min-height : unset;
345+ padding : 0 ;
346+ margin : 0 ;
347+ }
348+
349+ kbd kbd : not (: first-child ) {
350+ padding-left : 0.25rem ;
351+ }
352+
353+ kbd kbd : not (: last-child ) {
354+ padding-right : 0.25rem ;
355+ }
356+
357+ iframe {
358+ width : 100% ;
359+ border : none;
360+ }
361+
362+ dialog {
363+ max-height : calc (100% - 1rem );
364+ overflow-y : auto;
365+ border : none;
366+ }
367+
368+ audio ,
369+ video ,
370+ embed ,
371+ object {
372+ width : 100% ;
373+ }
374+
375+ [type = "range" ],
376+ meter ,
377+ progress {
378+ display : block;
379+ width : 100% ;
380+ height : 2.25rem ;
381+ }
382+
383+ [type = "color" ] {
384+ height : 2.25rem ;
385+ vertical-align : top;
386+ }
387+
388+ td ,
389+ th ,
390+ details ,
391+ button ,
392+ [type = "button" ],
393+ [type = "reset" ],
394+ [type = "submit" ] {
395+ padding : 0.5rem ;
396+ }
397+
398+ input : not ([type ]),
399+ [type = "email" ],
400+ [type = "hidden" ],
401+ [type = "number" ],
402+ [type = "password" ],
403+ [type = "search" ],
404+ [type = "tel" ],
405+ [type = "text" ],
406+ [type = "url" ] {
407+ display : block;
408+ width : 100% ;
409+ height : 2.25rem ;
410+ padding : 0.5rem ;
411+ }
412+
413+ [type = "file" ] {
414+ display : block;
415+ width : 100% ;
416+ height : 2.25rem ;
417+
418+ /* Works in Chrome (but poorly), doesn't work in Firefox */
419+ padding-top : 0.35rem ;
420+ }
421+
422+ [type = "date" ],
423+ [type = "datetime-local" ],
424+ [type = "time" ],
425+ [type = "month" ],
426+ [type = "week" ] {
427+ display : block;
428+ width : 100% ;
429+ height : 2.25rem ;
430+
431+ /* 0.4rem is a hack for mobile Chrome */
432+ padding : 0.4rem 0.5rem ;
433+ }
434+
435+ output {
436+ display : block;
437+ width : 100% ;
438+ }
439+
440+ textarea {
441+ display : block;
442+ width : 100% ;
443+ min-height : 8em ;
444+ padding : 0.5rem ;
445+ }
446+
447+ select {
448+ display : block;
449+ width : 100% ;
450+ min-height : 2.25rem ;
451+
452+ /* "padding: 0.5rem;" messes up the height of selects */
453+ padding : 0.45rem 0.5rem ;
454+ }
455+
456+ summary {
457+ padding : 0.5rem ;
458+ margin : -0.5rem ;
459+ }
460+
461+ [type = "image" ] {
462+ vertical-align : bottom;
463+ }
464+
465+ fieldset {
466+ padding : 0.75rem ;
467+ }
468+
469+ label > [type = "color" ] {
470+ margin-left : 0.25rem ;
471+ }
472+
473+ label {
474+ display : flex;
475+ flex-wrap : wrap;
476+ align-items : center;
477+ width : 100% ;
478+ margin-top : 1rem ;
479+ }
480+
481+ legend + label {
482+ margin-top : 0 ;
483+ }
484+
485+ [type = "checkbox" ] + label ,
486+ [type = "radio" ] + label {
487+ display : inline-flex;
488+ width : unset;
489+ vertical-align : text-bottom;
490+ }
491+
492+ /* stylelint-disable-next-line plugin/stylelint-group-selectors */
493+ blockquote > p : first-child ,
494+ fieldset > label : first-child {
495+ margin-top : 0 ;
496+ }
497+
498+ label > [type = "checkbox" ],
499+ label > [type = "radio" ] {
500+ min-height : 1rem ;
501+ margin-right : 0.25rem ;
502+ }
503+
504+ blockquote {
505+ padding : 1rem 2rem ;
506+ margin-right : 0 ;
507+ margin-left : 0 ;
508+ }
509+
510+ blockquote > p : last-child {
511+ margin-bottom : 0 ;
512+ }
513+
514+ footer {
515+ margin-top : 1rem ;
516+ }
517+
518+ figure > figcaption {
519+ text-align : center;
520+ }
521+
522+ body > footer {
523+ padding-bottom : 1rem ;
524+ }
525+
526+ figure {
527+ margin-right : 0 ;
528+ margin-left : 0 ;
529+ text-align : center;
530+ }
531+
532+ /* stylelint-disable-next-line selector-max-universal */
533+ figure > * {
534+ text-align : initial;
535+ }
536+
537+ dt {
538+ font-weight : bold;
539+ }
540+
541+ dd {
542+ margin-bottom : 1rem ;
543+ }
544+
545+ li {
546+ margin-top : 0.5rem ;
547+ margin-bottom : 0.5rem ;
548+ }
549+
550+ picture {
551+ display : block;
552+ text-align : center;
553+ }
286554abbr {
287555 cursor : help;
288556}
@@ -374,7 +642,7 @@ kbd {
374642 align-items : center;
375643 justify-content : center;
376644 min-width : 1.5rem ;
377- max-width : 100% ;
645+ max-width : calc ( 100% - 0.1 rem * 2 ) ;
378646 min-height : 1.5rem ;
379647 padding : 0 0.25rem ;
380648 margin : 0 0.1rem ;
0 commit comments