Skip to content

Commit ef0377e

Browse files
authored
Fixed format table vertical text on safari (#17)
1 parent b6b6d46 commit ef0377e

File tree

6 files changed

+18
-11
lines changed

6 files changed

+18
-11
lines changed

source/GUI/html/default.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/frontend/assets/css/report_table.css

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,9 @@ button:disabled {
158158
top: 0;
159159
}
160160

161-
.FormatTable tr:nth-of-type(1) td {
161+
.vertical-text {
162162
writing-mode: vertical-rl;
163-
}
164-
165-
.FormatTable tr:nth-of-type(1) td:nth-of-type(1) {
166-
writing-mode: horizontal-tb;
163+
white-space: pre;
167164
}
168165

169166
@media (prefers-color-scheme: dark) {

source/frontend/assets/js/format_table.mjs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as Properties from "./properties.mjs"
22
import * as Constants from "./constants.mjs"
33

44
const Headers = [
5-
"Format",
65
"Supported",
76
"Buffer",
87
"Vertex Buffer",
@@ -200,6 +199,16 @@ const RequiredSupport = {
200199
"115": { "Support1": 8655856, "Support2": 512 },
201200
}
202201

202+
function AddVerticalCell(row, text) {
203+
let cell = document.createElement("td")
204+
let cellText = document.createElement("div")
205+
cellText.textContent = text
206+
cellText.className = "vertical-text"
207+
cell.appendChild(cellText)
208+
row.appendChild(cell)
209+
return cell
210+
}
211+
203212
function AddCell(row, text) {
204213
let cell = document.createElement("td")
205214
cell.textContent = text
@@ -255,8 +264,9 @@ export function BuildFormatTable(reportContainer, tableContainer) {
255264

256265
const headerRow = document.createElement("tr")
257266

267+
AddCell(headerRow, "Format")
258268
for (const header of Headers) {
259-
AddCell(headerRow, header)
269+
AddVerticalCell(headerRow, header)
260270
}
261271

262272
table.appendChild(headerRow)

source/website/id.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)