mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-01 05:48:52 -06:00
fix: lay out every file card
With content-visibility: auto an off-screen card took a 320px placeholder, so the links of the card above were drawn over its own and Lighthouse failed target-size on the PS2 page (31 links on desktop, 7 on mobile). Laying out every card moved no Lighthouse metric: TBT stays at 0 ms on the PS2 and Project64 pages, mobile.
This commit is contained in:
1 parent
7e4192870f
commit
3eb5d1fce1
2 files changed
+11
-7
No files matched your search
@@ -183,8 +183,11 @@ class ThemeStylesheet(unittest.TestCase):
|
||||
|
||||
def test_card_pages(self):
|
||||
cards = next(b for s, b in _blocks(self.css) if s == ".sl-markdown-content :is(.rb-sys-file, .rb-file-entry)")
|
||||
self.assertIn("content-visibility: auto", cards)
|
||||
self.assertIn("contain-intrinsic-size: auto 320px", cards)
|
||||
# A card off screen with content-visibility kept a placeholder
|
||||
# height, and the links of the card above were drawn over its own
|
||||
# (Lighthouse target-size, 31 links on the PS2 page, desktop).
|
||||
self.assertNotIn("content-visibility", cards)
|
||||
self.assertNotRegex(self.css, r"content-visibility\s*:")
|
||||
self.assertIn("--sl-content-width: var(--rb-grid-width)", _rules(self.css, "body:has(.rb-sys-file, .rb-file-entry)")[0])
|
||||
self.assertEqual(_theme_tokens(self.css, ":root")["--rb-grid-width"], "54rem")
|
||||
facts = _rules(self.css, "dl.rb-facts")[0]
|
||||
|
||||
Reference in new issue
Block a user