mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 02:27:52 -06:00
fix: size the upstream table by a class
The cross-reference upstream table was reached with .sl-heading-wrapper:has(> #by-upstream-emulator) ~ section, which the browser matched again for every block added after any heading of any page: about 400 ms of style work while the gaps page loads (mobile, 4x CPU throttling, 586 ms down to 200 ms). The table sits in a .rb-xref-upstream block, and the address column is its second.
This commit is contained in:
1 parent
cb23f7f8a4
commit
9760c2fadd
3 files changed
+28
-11
No files matched your search
@@ -242,7 +242,14 @@ def _render_xref_by_upstream(
|
||||
+ f" | {upstream_cell} | {', '.join(_breakable(r) for r in revisions) or '-'} "
|
||||
f"| {', '.join(classifications)} | {len(plats)} |"
|
||||
)
|
||||
return lines
|
||||
# A class the stylesheet sizes the columns by. Found from the heading
|
||||
# with `.sl-heading-wrapper:has(> #by-upstream-emulator) ~ section`, the
|
||||
# rule was checked again for every block the browser added after any
|
||||
# heading of any page: 400 ms of style work on the gaps page (mobile,
|
||||
# 4x CPU throttling).
|
||||
table = lines.index("| Cores | Upstream | Revisions | Classification | Platforms |")
|
||||
return [*lines[:table], markup.block_open("div", 'class="rb-xref-upstream"'), "",
|
||||
*lines[table:], "", "</div>"]
|
||||
|
||||
|
||||
def generate_cross_reference(
|
||||
|
||||
Reference in new issue
Block a user