|
13 | 13 |
|
14 | 14 | /* ====== テーブル ====== |
15 | 15 | PCでも「時間は4桁」「会場は全文表示」できるように |
16 | | - table-layout: auto と最小幅制約を組み合わせる |
| 16 | + table-layout: fixed と最小幅制約を組み合わせる |
17 | 17 | */ |
18 | 18 | .ttable{ |
19 | 19 | table-layout: fixed; |
| 20 | + |
| 21 | + /* 行間の既定 2px を無効化して rowspan 高さと行高を一致させる */ |
| 22 | + border-collapse: separate; |
| 23 | + border-spacing: 0; |
| 24 | + |
20 | 25 | --w-start: 5rem; |
21 | 26 | --room-min: clamp(235px, calc((100dvw - var(--w-start) - 10rem)), 20rem); |
22 | | - --row-h: 56px; |
| 27 | + --row-h: 72px; |
23 | 28 |
|
24 | 29 | width: calc(var(--w-start) + var(--room-min) * var(--room-count)); |
25 | 30 | } |
|
42 | 47 | .ttable thead th.ttable__th--start{ position: sticky; z-index: 4; } |
43 | 48 |
|
44 | 49 | /* 会場ヘッダーと本文セルの最小幅をそろえる(PCで潰れない) */ |
45 | | -.ttable__th--room{ border-left: 1px solid #ececf1; color:#111; background: |
46 | | - linear-gradient(0deg, rgba(255,255,255,0.88), rgba(255,255,255,0.88)), var(--room-color, #c43b3b); |
| 50 | +.ttable__th--room{ |
| 51 | + border-left: 1px solid #ececf1; color:#111; |
| 52 | + background: linear-gradient(0deg, rgba(255,255,255,0.88), rgba(255,255,255,0.88)), var(--room-color, #c43b3b); |
47 | 53 | width: var(--room-min); |
48 | 54 | } |
49 | 55 | .ttable tbody td{ width: var(--room-min); } |
|
64 | 70 | padding: 8px 10px; |
65 | 71 | border-right: 1px solid #f0f0f3; |
66 | 72 | vertical-align: top; |
67 | | - /* 固定高さを外し、rowspanで正しく縦に伸びるようにする */ |
68 | | - height: auto; |
| 73 | + height: auto; /* rowspan の高さを素直に反映 */ |
69 | 74 | background-clip: padding-box; |
70 | 75 | } |
71 | 76 |
|
|
74 | 79 | position: sticky; z-index: 2; background: #fff; left: 0; |
75 | 80 | min-width: var(--w-start); font-weight: 700; text-align: left; |
76 | 81 | } |
77 | | -/* stickyの左列は行の背景の上に乗るため、 |
78 | | - 横点線が隠れないよう同じ罫線を重ねる */ |
| 82 | +/* stickyの左列は行の背景の上に乗るため、横点線が隠れないよう同じ罫線を重ねる */ |
79 | 83 | .ttable__cell--start{ |
80 | 84 | background-image: linear-gradient(to right, rgba(0,0,0,0.10) 50%, rgba(0,0,0,0) 0); |
81 | 85 | background-size: 6px 1px; |
|
86 | 90 | /* 空き枠 */ |
87 | 91 | .ttable__cell--empty{ background: #fff; } |
88 | 92 |
|
89 | | -/* イベント:カード化(CEATEC風) */ |
90 | | -.ttable__cell--event{ background: #fff; } |
91 | | -.ttable__cell--event .ttable__event{ min-height: calc(var(--row-h) * var(--span, 1)); } |
| 93 | +/* ====== イベント:カード化(CEATEC風) ====== |
| 94 | + 上下余白は CSS 変数 --pad-v で可変。 |
| 95 | + 1スロットのイベントのみ 6px、長時間は 0px(16:00 にビタッと届く) |
| 96 | +*/ |
| 97 | +.ttable__cell--event{ |
| 98 | + background: #fff; |
| 99 | + position: relative; /* 子の absolute の基準 */ |
| 100 | + padding-top: 0; /* 上下の余白はカード側で管理 */ |
| 101 | + padding-bottom: 0; |
| 102 | + /* 左右の 10px パディングは .ttable__cell 由来で維持 */ |
| 103 | +} |
| 104 | + |
| 105 | +.ttable__cell--event .ttable__event{ min-height: 0; } |
| 106 | + |
92 | 107 | .ttable__event{ |
93 | | - position: relative; |
| 108 | + position: absolute; |
| 109 | + /* top/bottom に可変の余白、左右はセルの内側にぴったり */ |
| 110 | + inset: var(--pad-v, 0) 0; |
| 111 | + |
94 | 112 | border: 1px solid #e5e6eb; |
95 | 113 | border-radius: 14px; |
96 | 114 | box-shadow: 0 2px 8px rgba(0,0,0,0.06); |
97 | | - padding: 10px 12px 12px; |
| 115 | + padding: 6px 12px 4px; |
98 | 116 | background: #fff; |
99 | | - height: 100%; |
| 117 | + height: auto; |
| 118 | + box-sizing: border-box; |
100 | 119 | display: flex; |
101 | 120 | flex-direction: column; |
102 | 121 | overflow: clip; |
103 | 122 | text-decoration: none; |
104 | 123 | color: inherit; |
105 | 124 | } |
106 | 125 | .ttable__event[href]{ cursor: pointer; } |
107 | | -.ttable__event::before{ content:""; position:absolute; inset:0 0 auto 0; height: 6px; background: var(--accent, #c43b3b); } |
108 | | -.ttable__event-time{ font-weight: 800; font-size: 1.05rem; letter-spacing: .3px; margin: 8px 0 4px; color: #c43b3b; } |
109 | | -.ttable__event-title{ font-weight: 800; line-height: 1.35; margin-bottom: 4px; color: #121212; } |
110 | | -.ttable__event-subtitle{ color: #ee7d05; font-weight: 700; font-size: .92rem; line-height: 1.3; } |
111 | | -.ttable__badge{ position: absolute; top: 8px; right: 10px; padding: 2px 8px; border-radius: 999px; font-size: .85rem; font-weight: 800; color: #fff; background: var(--accent,#c43b3b); box-shadow: 0 1px 4px rgba(0,0,0,.1); } |
| 126 | +.ttable__event::before{ |
| 127 | + content:""; position:absolute; inset:0 0 auto 0; |
| 128 | + height: 6px; background: var(--accent, #c43b3b); |
| 129 | +} |
| 130 | +.ttable__event-time{ |
| 131 | + font-weight: 800; font-size: .97rem; letter-spacing: .18px; |
| 132 | + margin: 1px 0 0; color: #c43b3b; |
| 133 | +} |
| 134 | +.ttable__event-title{ |
| 135 | + font-weight: 800; line-height: 1.2; margin-bottom: 2px; color: #121212; |
| 136 | +} |
| 137 | +.ttable__event-subtitle{ |
| 138 | + color: #ee7d05; font-weight: 700; font-size: .92rem; line-height: 1.3; |
| 139 | +} |
| 140 | +.ttable__badge{ |
| 141 | + position: absolute; top: 8px; right: 10px; padding: 2px 8px; |
| 142 | + border-radius: 999px; font-size: .85rem; font-weight: 800; color: #fff; |
| 143 | + background: var(--accent,#c43b3b); box-shadow: 0 1px 4px rgba(0,0,0,.1); |
| 144 | +} |
0 commit comments