Align share button and all component scales with DESIGN.md
Share button was themed only in pages/home.css, so /stops, /routes and /check rendered an unstyled button. Moved to _shared.css and rebuilt as a ghost variant of .mu-btn: - radius 12px -> var(--radius) 8px, min-height 44px (48px on touch) - focus ring #2b2f42 (near-black) -> var(--c-focus) - LINE link green -> brand purple (DESIGN.md is single-accent) - hover/active/transition states added Global scale cleanup (DESIGN.md allows 4px/8px radii only): - 16 distinct border-radius values -> var(--radius-sm) / var(--radius) / var(--radius-pill) - 39 distinct font-sizes -> 13-step scale - outline-offset 1px/2px/3px -> 2px everywhere - radius and type scale documented in DESIGN.md as enforced tokens Verified across 4 pages x 2 themes: identical 44x158 button, radius 8px, contrast 5.80 light / 7.37 dark, no horizontal overflow.
This commit is contained in:
1 parent
66d7e235c3
commit
bf42076b52
14 files changed
+352
-246
No files matched your search
+20
-20
@@ -10,7 +10,7 @@
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
border: 1px solid #ddd5c0;
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius);
|
||||
background: var(--c-tint-amber); /* --paper — พื้นตอน tile ยังไม่มา/ออฟไลน์ */
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/* ปุ่ม zoom — ให้เข้าธีม (ขอบบาง ไม่มีเงา) */
|
||||
.at-map .leaflet-control-zoom a {
|
||||
border-radius: 4px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid #ddd5c0;
|
||||
background: var(--c-tint-amber);
|
||||
color: var(--c-ok);
|
||||
@@ -33,7 +33,7 @@
|
||||
.at-map .leaflet-control-attribution {
|
||||
background: rgba(255, 253, 246, .88);
|
||||
border-top-left-radius: 4px;
|
||||
font-size: .68rem;
|
||||
font-size: 0.72rem;
|
||||
color: var(--c-ink-2);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
.at-pin {
|
||||
display: block;
|
||||
width: 14px; height: 14px;
|
||||
border-radius: 4px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 2px solid #fffdf6;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -52,10 +52,10 @@
|
||||
/* ป้ายที่กำลังเปิดดูอยู่ — ใหญ่กว่าเพื่อให้เห็นชัด */
|
||||
.at-pin.here { background: #f2a900; width: 18px; height: 18px; border-width: 3px; }
|
||||
/* จุดย่อย (จุดขึ้นรถประจำทางอื่นๆ) — สี่เหลี่ยมม่วง ต่างจากหมุดกลม */
|
||||
.at-pin.sub { background: var(--c-brand); border-radius: 2px; }
|
||||
.at-pin.sub { background: var(--c-brand); border-radius: var(--radius-sm); }
|
||||
|
||||
.at-map .leaflet-tooltip {
|
||||
border-radius: 4px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid #ddd5c0;
|
||||
background: var(--c-tint-amber);
|
||||
color: var(--c-ok);
|
||||
@@ -72,9 +72,9 @@
|
||||
z-index: 500;
|
||||
background: rgba(255, 253, 246, .94);
|
||||
border: 1px solid #ddd5c0;
|
||||
border-radius: 4px;
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 7px 10px;
|
||||
font-size: .74rem;
|
||||
font-size: 0.72rem;
|
||||
color: var(--c-ok);
|
||||
line-height: 1.65;
|
||||
pointer-events: none;
|
||||
@@ -82,17 +82,17 @@
|
||||
.at-legend i {
|
||||
display: inline-block;
|
||||
width: 14px; height: 5px;
|
||||
border-radius: 2px;
|
||||
border-radius: var(--radius-sm);
|
||||
margin-right: 6px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.at-legend i.sq { width: 10px; height: 10px; border-radius: 3px; border: 2px solid #fffdf6; box-sizing: border-box; }
|
||||
.at-legend i.sq { width: 10px; height: 10px; border-radius: var(--radius-sm); border: 2px solid #fffdf6; box-sizing: border-box; }
|
||||
|
||||
/* ---------- caption ใต้แผนที่ ---------- */
|
||||
.at-map-caption {
|
||||
margin: 9px 0 0;
|
||||
color: var(--c-ink-2);
|
||||
font-size: .82rem;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
.at-map-caption b { color: var(--c-ok); }
|
||||
.at-map-caption .at-offline { color: var(--c-warn); }
|
||||
@@ -103,28 +103,28 @@
|
||||
|
||||
/* ---------- popup บนแผนที่ (ป้าย/สถานี) ---------- */
|
||||
.at-map .leaflet-popup-content-wrapper {
|
||||
border-radius: 4px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid #ddd5c0;
|
||||
background: var(--c-tint-amber);
|
||||
box-shadow: none;
|
||||
color: var(--c-ok);
|
||||
}
|
||||
.at-map .leaflet-popup-tip { background: var(--c-tint-amber); box-shadow: none; }
|
||||
.at-map .leaflet-popup-content { margin: 10px 12px; font-size: .8rem; }
|
||||
.at-map .leaflet-popup-content { margin: 10px 12px; font-size: 0.78rem; }
|
||||
.at-pop { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
|
||||
.at-pop b { font-size: .86rem; color: var(--c-ok); }
|
||||
.at-pop b { font-size: 0.85rem; color: var(--c-ok); }
|
||||
.at-pop span { color: var(--c-ink-2); }
|
||||
.at-pop a { margin-top: 4px; color: var(--c-ok); font-weight: 700; text-decoration: none; border-bottom: 1px solid #1f7a3d; align-self: flex-start; }
|
||||
.at-pop a:hover { color: var(--c-ok); }
|
||||
|
||||
/* ---------- รายการจุดจอดตามเส้นทาง + กม. จากต้นทาง ---------- */
|
||||
.at-km-wrap { margin-top: 14px; border-top: 1px solid #ddd5c0; padding-top: 12px; }
|
||||
.at-km-wrap > h3 { margin: 0 0 8px; font-size: .9rem; font-weight: 800; color: var(--c-ok); }
|
||||
.at-km-wrap > h3 { margin: 0 0 8px; font-size: 0.95rem; font-weight: 800; color: var(--c-ok); }
|
||||
.at-km-wrap ul { list-style: none; margin: 0; padding: 0; }
|
||||
.at-km-wrap li + li { border-top: 1px dashed #ddd5c0; }
|
||||
.at-km-row { display: flex; align-items: center; gap: 9px; padding: 7px 2px; text-decoration: none; color: var(--c-ok); font-size: .86rem; }
|
||||
.at-km-row { display: flex; align-items: center; gap: 9px; padding: 7px 2px; text-decoration: none; color: var(--c-ok); font-size: 0.85rem; }
|
||||
.at-km-row:hover .at-km-name { color: var(--c-ok); text-decoration: underline; }
|
||||
.at-km-dot { width: 9px; height: 9px; border-radius: 3px; background: #f2a900; flex: none; }
|
||||
.at-km-dot { width: 9px; height: 9px; border-radius: var(--radius-sm); background: #f2a900; flex: none; }
|
||||
.at-km-name { flex: 1; font-weight: 600; }
|
||||
.at-km-val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--c-ok); }
|
||||
/* จุดจอดที่ไม่มีหน้ารายละเอียด (มาจาก 8 other_stop.json) — ไม่ใช่ลิงก์ */
|
||||
@@ -135,14 +135,14 @@
|
||||
.at-km-row .at-km-val.is-off { color: var(--c-warn); font-weight: 600; font-size: .78rem; }
|
||||
|
||||
/* ---------- ป้ายใกล้ฉัน ---------- */
|
||||
.at-near-msg { margin: 14px 0 0; color: var(--c-ink-2); font-size: .86rem; }
|
||||
.at-near-msg { margin: 14px 0 0; color: var(--c-ink-2); font-size: 0.85rem; }
|
||||
.at-near-err { color: var(--c-warn); }
|
||||
.at-near-list { list-style: none; margin: 12px 0 0; padding: 0; }
|
||||
.at-near-list li + li { border-top: 1px dashed #ddd5c0; }
|
||||
.at-near-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 2px; text-decoration: none; color: var(--c-ok); align-items: center; }
|
||||
.at-near-row:hover .at-near-name { color: var(--c-ok); text-decoration: underline; }
|
||||
.at-near-name { font-weight: 700; font-size: .9rem; }
|
||||
.at-near-meta { grid-column: 1; color: var(--c-ink-2); font-size: .76rem; }
|
||||
.at-near-name { font-weight: 700; font-size: 0.95rem; }
|
||||
.at-near-meta { grid-column: 1; color: var(--c-ink-2); font-size: 0.78rem; }
|
||||
.at-near-dist { grid-column: 2; grid-row: 1 / span 2; font-variant-numeric: tabular-nums; font-weight: 800; color: var(--c-ok); white-space: nowrap; }
|
||||
|
||||
/* ---------- กัน CSS ภายนอกทำลายขนาด SVG ของ Leaflet ----------
|
||||
|
||||
Reference in new issue
Block a user