collin/mahjong · f8f3a70c
Fix the settings panel collapsing to a sliver, and size it for a table
Collin Richards · 2026-08-07 09:30 UTC · f8f3a70cc3230505e3d54515563a240cf218a4e7 · parent 51bd1b32 · browse files
modifiedsrc/styles.css+49 −36
| ⋯ 1005 unchanged lines | |||
| 1006 | 1006 | padding: 20px; | |
| 1007 | 1007 | } | |
| 1008 | 1008 | .settings { | |
| 1009 | - | width: min(880px, 100%); | |
| 1009 | + | width: min(1180px, 100%); | |
| 1010 | 1010 | max-height: 100%; | |
| 1011 | 1011 | display: flex; | |
| 1012 | 1012 | flex-direction: column; | |
| ⋯ 1 unchanged line | |||
| 1014 | 1014 | border: 1px solid rgba(217, 180, 92, 0.4); | |
| 1015 | 1015 | border-radius: 14px; | |
| 1016 | 1016 | box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6); | |
| 1017 | - | padding: 12px 20px 16px; | |
| 1017 | + | padding: 16px 28px 22px; | |
| 1018 | 1018 | } | |
| 1019 | 1019 | .settings-head { | |
| 1020 | 1020 | display: flex; | |
| ⋯ 1 unchanged line | |||
| 1022 | 1022 | justify-content: space-between; | |
| 1023 | 1023 | gap: 16px; | |
| 1024 | 1024 | flex: none; | |
| 1025 | - | padding-bottom: 8px; | |
| 1025 | + | padding-bottom: 12px; | |
| 1026 | 1026 | border-bottom: 1px solid rgba(246, 240, 226, 0.12); | |
| 1027 | 1027 | } | |
| 1028 | 1028 | .settings-head h3 { | |
| 1029 | 1029 | margin: 0; | |
| 1030 | - | font-size: 17px; | |
| 1030 | + | font-size: 22px; | |
| 1031 | 1031 | font-weight: 400; | |
| 1032 | 1032 | letter-spacing: 0.08em; | |
| 1033 | 1033 | color: var(--gold); | |
| ⋯ 3 unchanged lines | |||
| 1037 | 1037 | gap: 10px; | |
| 1038 | 1038 | } | |
| 1039 | 1039 | .settings-head .btn { | |
| 1040 | - | min-height: 36px; | |
| 1041 | - | padding: 2px 16px; | |
| 1042 | - | font-size: 14px; | |
| 1040 | + | min-height: 46px; | |
| 1041 | + | padding: 2px 22px; | |
| 1042 | + | font-size: 17px; | |
| 1043 | 1043 | } | |
| 1044 | 1044 | .settings-body { | |
| 1045 | - | flex: 1 1 0; | |
| 1045 | + | /* `1 1 auto`, not `1 1 0`: the panel's own height comes from this content, | |
| 1046 | + | so a zero basis collapses the pair of them to nothing. `max-height` on the | |
| 1047 | + | panel is what brings the scrollbar back at the other end. */ | |
| 1048 | + | flex: 1 1 auto; | |
| 1046 | 1049 | min-height: 0; | |
| 1047 | 1050 | overflow-y: auto; | |
| 1048 | 1051 | scrollbar-width: thin; | |
| 1049 | - | padding-top: 10px; | |
| 1050 | - | display: grid; | |
| 1051 | - | grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); | |
| 1052 | - | gap: 4px 28px; | |
| 1053 | - | align-content: start; | |
| 1052 | + | padding-top: 14px; | |
| 1053 | + | /* Columns rather than a grid: grid rows would size to the tallest section | |
| 1054 | + | and leave the shorter one padded with air, which is what pushed the last | |
| 1055 | + | house rule off the bottom. */ | |
| 1056 | + | columns: 2; | |
| 1057 | + | column-gap: 44px; | |
| 1054 | 1058 | } | |
| 1055 | 1059 | .settings-body section { | |
| 1056 | - | margin-bottom: 12px; | |
| 1060 | + | break-inside: avoid; | |
| 1061 | + | margin-bottom: 22px; | |
| 1057 | 1062 | } | |
| 1058 | 1063 | .settings-body h4 { | |
| 1059 | - | margin: 0 0 6px; | |
| 1060 | - | font-size: 13px; | |
| 1064 | + | margin: 0 0 10px; | |
| 1065 | + | font-size: 16px; | |
| 1061 | 1066 | font-weight: 400; | |
| 1062 | 1067 | color: var(--gold); | |
| 1063 | 1068 | letter-spacing: 0.06em; | |
| 1064 | 1069 | } | |
| 1065 | 1070 | .settings-body h4 em { | |
| 1066 | 1071 | font-style: normal; | |
| 1067 | - | font-size: 9px; | |
| 1072 | + | font-size: 11px; | |
| 1068 | 1073 | letter-spacing: 0.12em; | |
| 1069 | 1074 | text-transform: uppercase; | |
| 1070 | 1075 | opacity: 0.55; | |
| ⋯ 2 unchanged lines | |||
| 1073 | 1078 | .settings .field { | |
| 1074 | 1079 | display: flex; | |
| 1075 | 1080 | align-items: center; | |
| 1076 | - | gap: 10px; | |
| 1077 | - | padding: 3px 0; | |
| 1081 | + | gap: 14px; | |
| 1082 | + | padding: 5px 0; | |
| 1078 | 1083 | } | |
| 1079 | 1084 | .settings .f-label { | |
| 1080 | 1085 | display: flex; | |
| 1081 | 1086 | align-items: baseline; | |
| 1082 | - | gap: 5px; | |
| 1083 | - | font-size: 13px; | |
| 1084 | - | min-width: 92px; | |
| 1087 | + | gap: 6px; | |
| 1088 | + | font-size: 16px; | |
| 1089 | + | /* Wide enough for 起始籌碼 STARTING CHIPS, so every input in a section | |
| 1090 | + | starts at the same place. */ | |
| 1091 | + | min-width: 196px; | |
| 1085 | 1092 | opacity: 0.85; | |
| 1086 | 1093 | } | |
| 1094 | + | /* ...except the player rows, which are labelled 1–4 and need no such room. */ | |
| 1095 | + | .settings .names .f-label { | |
| 1096 | + | min-width: 26px; | |
| 1097 | + | } | |
| 1087 | 1098 | .settings .f-label em { | |
| 1088 | 1099 | font-style: normal; | |
| 1089 | - | font-size: 9px; | |
| 1100 | + | font-size: 11px; | |
| 1090 | 1101 | letter-spacing: 0.1em; | |
| 1091 | 1102 | text-transform: uppercase; | |
| 1092 | 1103 | opacity: 0.55; | |
| ⋯ 4 unchanged lines | |||
| 1097 | 1108 | flex: 1 1 0; | |
| 1098 | 1109 | min-width: 0; | |
| 1099 | 1110 | font-family: inherit; | |
| 1100 | - | font-size: 15px; | |
| 1111 | + | font-size: 18px; | |
| 1101 | 1112 | color: var(--ivory); | |
| 1102 | 1113 | background: rgba(0, 0, 0, 0.28); | |
| 1103 | 1114 | border: 1px solid rgba(246, 240, 226, 0.25); | |
| 1104 | - | border-radius: 7px; | |
| 1105 | - | padding: 7px 10px; | |
| 1115 | + | border-radius: 8px; | |
| 1116 | + | padding: 11px 14px; | |
| 1117 | + | min-height: 48px; | |
| 1106 | 1118 | user-select: text; | |
| 1107 | 1119 | } | |
| 1108 | 1120 | .settings input:focus { | |
| ⋯ 1 unchanged line | |||
| 1110 | 1122 | border-color: rgba(217, 180, 92, 0.8); | |
| 1111 | 1123 | } | |
| 1112 | 1124 | .settings input[type='number'] { | |
| 1113 | - | max-width: 110px; | |
| 1125 | + | max-width: 150px; | |
| 1114 | 1126 | } | |
| 1115 | 1127 | .settings input[type='range'] { | |
| 1116 | 1128 | flex: 1 1 0; | |
| 1129 | + | height: 34px; | |
| 1117 | 1130 | accent-color: var(--gold); | |
| 1118 | 1131 | } | |
| 1119 | 1132 | .settings input:disabled { | |
| ⋯ 2 unchanged lines | |||
| 1122 | 1135 | .settings .switch { | |
| 1123 | 1136 | display: grid; | |
| 1124 | 1137 | grid-template-columns: auto 1fr; | |
| 1125 | - | gap: 2px 10px; | |
| 1138 | + | gap: 3px 14px; | |
| 1126 | 1139 | align-items: center; | |
| 1127 | - | padding: 5px 0; | |
| 1140 | + | padding: 9px 0; | |
| 1128 | 1141 | cursor: pointer; | |
| 1129 | 1142 | } | |
| 1130 | 1143 | .settings .switch input { | |
| 1131 | - | width: 20px; | |
| 1132 | - | height: 20px; | |
| 1144 | + | width: 26px; | |
| 1145 | + | height: 26px; | |
| 1133 | 1146 | accent-color: var(--gold); | |
| 1134 | 1147 | cursor: pointer; | |
| 1135 | 1148 | } | |
| 1136 | 1149 | .settings .sw-name { | |
| 1137 | 1150 | display: flex; | |
| 1138 | 1151 | align-items: baseline; | |
| 1139 | - | gap: 6px; | |
| 1140 | - | font-size: 14px; | |
| 1152 | + | gap: 8px; | |
| 1153 | + | font-size: 17px; | |
| 1141 | 1154 | } | |
| 1142 | 1155 | .settings .sw-name em { | |
| 1143 | 1156 | font-style: normal; | |
| 1144 | - | font-size: 9px; | |
| 1157 | + | font-size: 11px; | |
| 1145 | 1158 | letter-spacing: 0.1em; | |
| 1146 | 1159 | text-transform: uppercase; | |
| 1147 | 1160 | opacity: 0.55; | |
| 1148 | 1161 | } | |
| 1149 | 1162 | .settings .note { | |
| 1150 | 1163 | grid-column: 2; | |
| 1151 | - | font-size: 11px; | |
| 1152 | - | line-height: 1.35; | |
| 1164 | + | font-size: 13px; | |
| 1165 | + | line-height: 1.4; | |
| 1153 | 1166 | opacity: 0.55; | |
| 1154 | 1167 | } | |
| 1155 | 1168 | .settings .switch.dead { | |
| ⋯ 9 unchanged lines | |||