Skip to content

Commit bbec5af

Browse files
fix(base.css): add extra vertical padding to table cells containing ruby element (#760)
1 parent 76cefc1 commit bbec5af

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

src/base.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@
147147
background-color: var(--background-tertiary);
148148
}
149149

150+
table td:has(ruby) {
151+
padding-block: 8px;
152+
}
153+
150154
p:has(ruby),
151155
li:has(> ruby) {
152156
padding: 0.5rem 0;

src/typography/typography.tsx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,41 @@ export const Typography = (): JSX.Element => {
114114
: Teacher
115115
</li>
116116
</ul>
117+
<h3>Ruby in Tables</h3>
118+
<table>
119+
<thead>
120+
<tr>
121+
<th>Number</th>
122+
<th>Chinese</th>
123+
</tr>
124+
</thead>
125+
<tbody>
126+
<tr>
127+
<td>0</td>
128+
<td>
129+
<ruby>
130+
<rt>líng</rt>
131+
</ruby>
132+
</td>
133+
</tr>
134+
<tr>
135+
<td>1</td>
136+
<td>
137+
<ruby>
138+
<rt></rt>
139+
</ruby>
140+
</td>
141+
</tr>
142+
<tr>
143+
<td>2</td>
144+
<td>
145+
<ruby>
146+
<rt>èr</rt>
147+
</ruby>
148+
</td>
149+
</tr>
150+
</tbody>
151+
</table>
117152
</section>
118153
</div>
119154
);

0 commit comments

Comments
 (0)