Skip to content

Commit d3dd244

Browse files
Standardizing CSS for cross-browser consistecny
1 parent 084946a commit d3dd244

File tree

1 file changed

+43
-28
lines changed

1 file changed

+43
-28
lines changed

static/css/style.css

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,6 @@ ion-icon+span {
447447
font-size: 20px;
448448
margin: .5rem auto;
449449
white-space: normal;
450-
/* keep flex but allow wrapping so the scale section can be full width */
451450
display: flex;
452451
flex-wrap: wrap;
453452
gap: 1rem;
@@ -465,14 +464,14 @@ ion-icon+span {
465464
flex: 1 1 100%;
466465
min-width: 280px;
467466
order: 2;
468-
margin-top: 0.2rem;
467+
margin-top: 0;
469468
}
470469

471470
#options-container fieldset {
472471
border: 1px solid var(--foreground-1);
473472
border-radius: .5rem;
474473
margin-bottom: 1rem;
475-
padding: .5rem 1rem 1rem;
474+
padding: .25rem 1rem 1rem;
476475
}
477476

478477
#options-container legend {
@@ -483,23 +482,35 @@ ion-icon+span {
483482

484483
#options-container label {
485484
cursor: help;
485+
display: inline-block;
486486
}
487487

488488
/* spacing between labels and controls in options fieldsets */
489489
#options-container fieldset label,
490490
#options-container fieldset input[type="checkbox"],
491491
#options-container fieldset select,
492492
#options-container fieldset input[type="file"] {
493-
margin-bottom: 0.3em;
494-
margin-right: 0.4em;
493+
margin-bottom: 0.5rem;
494+
margin-right: 0.5rem;
495+
}
496+
497+
/* Ensure consistent line-height for all form elements */
498+
#options-container fieldset input[type="checkbox"] {
499+
vertical-align: middle;
500+
margin-top: 0;
501+
}
502+
503+
#options-container fieldset select {
504+
padding: .2rem;
505+
vertical-align: middle;
495506
}
496507

497508
#custom-bounds-inputs {
498509
display: flex;
499510
flex-direction: column;
500511
gap: 0.5rem;
501512
margin-top: 0.5rem;
502-
padding: 0.5rem;
513+
padding: 0.75rem;
503514
background-color: rgba(0, 0, 0, 0.05);
504515
border-radius: 0.25rem;
505516
}
@@ -513,33 +524,41 @@ ion-icon+span {
513524
#custom-bounds-inputs label {
514525
font-size: 0.9em;
515526
flex-shrink: 0;
527+
min-width: 80px;
516528
}
517529

518530
#custom-bounds-inputs input[type="number"] {
519531
width: 100%;
520-
padding: 5px;
532+
padding: 5px 8px;
521533
border: 1px solid #ccc;
522534
border-radius: .25rem;
523535
font-family: 'Roboto Mono', monospace;
524536
}
525537

526538
#options-container fieldset label {
527-
padding-left: 0.25em;
528-
padding-right: 0.1em;
539+
padding-left: 0;
540+
padding-right: 0;
529541
}
530542

531543
/* spacing between rows in fieldsets */
532544
#options-container fieldset>* {
533-
margin-bottom: 0.4em;
545+
margin-bottom: 0.5rem;
546+
}
547+
548+
#options-container fieldset>*:last-child {
549+
margin-bottom: 0;
534550
}
535551

536552
#custom-scale-section {
537553
border: 1px solid var(--foreground-1);
538554
border-radius: .5rem;
539-
margin: -1em 0;
555+
margin: 0;
540556
padding: 1rem;
541557
background-color: rgba(0, 0, 0, 0.1);
542558
}
559+
#custom-scale-section select {
560+
margin: 0;
561+
}
543562

544563
#map-selector {
545564
font-weight: 300;
@@ -701,7 +720,7 @@ ion-icon+span {
701720
#custom-scale-section {
702721
border: 1px solid var(--foreground-1);
703722
border-radius: .5rem;
704-
margin: -1em 0;
723+
margin: 0;
705724
padding: 1rem;
706725
background-color: rgba(0, 0, 0, 0.1);
707726
}
@@ -747,13 +766,13 @@ ion-icon+span {
747766
}
748767

749768
#scale-editor h4 {
750-
margin-bottom: .5rem;
769+
margin-bottom: .75rem;
751770
font-family: "Fira Sans", sans-serif;
752771
color: var(--foreground-1);
753772
}
754773

755774
#scale-speed-unit-selector {
756-
margin-bottom: .5rem;
775+
margin-bottom: .75rem;
757776
}
758777

759778
#scale-speed-unit-selector label {
@@ -780,15 +799,15 @@ ion-icon+span {
780799
#scale-entries>div {
781800
display: flex;
782801
align-items: center;
783-
gap: .5rem;
802+
gap: 0.5rem;
784803
margin-bottom: .5rem;
785804
background: rgba(0, 0, 0, 0.1);
786-
padding: .5rem;
805+
padding: .75rem;
787806
border-radius: .25rem;
788807
}
789808

790809
#scale-entries input {
791-
margin: 0 1em;
810+
margin: 0;
792811
}
793812

794813
.scale-cat,
@@ -901,19 +920,11 @@ ion-icon+span {
901920
#clear-buttons-wrapper {
902921
display: flex;
903922
justify-content: center;
904-
gap: 0.5em;
905-
margin-top: 0.5em;
906-
margin-bottom: 0.2em;
907-
}
908-
909-
#clear-all-data:hover,
910-
#clear-storm-data:hover {
911-
background-color: #f44336;
912-
color: #fff;
923+
gap: 0.5rem;
924+
margin-top: 0.5rem;
925+
margin-bottom: 0;
913926
}
914927

915-
916-
917928
/* ACE modal styles */
918929
#ace-results.ace-card {
919930
position: fixed;
@@ -1137,4 +1148,8 @@ ion-icon+span {
11371148
color: #000;
11381149
border: 1px solid #999;
11391150
}
1151+
1152+
#custom-bounds-inputs {
1153+
background-color: rgba(0, 0, 0, 0.15);
1154+
}
11401155
}

0 commit comments

Comments
 (0)