From 92d2dbddfcb4124935f57ec4dd097dae54ec2986 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Fri, 16 Nov 2018 00:37:28 -0800 Subject: [PATCH] perf(virtuallist): add contain:content to virtual list items (#650) * perf(virtuallist): add contain:content to virtual list items * add a few more contain:contents --- routes/_components/Nav.html | 1 + routes/_components/virtualList/VirtualListItem.html | 1 + scss/global.scss | 1 + templates/2xx.html | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/routes/_components/Nav.html b/routes/_components/Nav.html index 267b2cc..629f0de 100644 --- a/routes/_components/Nav.html +++ b/routes/_components/Nav.html @@ -23,6 +23,7 @@ right: 0; top: 0; z-index: 10; + contain: content; /* see https://www.w3.org/TR/2018/CR-css-contain-1-20181108/#valdef-contain-content */ } .main-nav-ul { diff --git a/routes/_components/virtualList/VirtualListItem.html b/routes/_components/virtualList/VirtualListItem.html index 6d44c19..a419c6c 100644 --- a/routes/_components/virtualList/VirtualListItem.html +++ b/routes/_components/virtualList/VirtualListItem.html @@ -16,6 +16,7 @@ opacity: 0; pointer-events: none; transition: opacity 0.333s linear; + contain: content; /* see https://www.w3.org/TR/2018/CR-css-contain-1-20181108/#valdef-contain-content */ } .virtual-list-item.shown { opacity: 1; diff --git a/scss/global.scss b/scss/global.scss index 58f34dd..342a25c 100644 --- a/scss/global.scss +++ b/scss/global.scss @@ -17,6 +17,7 @@ body { left: 0; right: 0; bottom: 0; + contain: content; /* see https://www.w3.org/TR/2018/CR-css-contain-1-20181108/#valdef-contain-content */ @media (max-width: 991px) { top: 52px; } diff --git a/templates/2xx.html b/templates/2xx.html index e086d7d..9db9221 100644 --- a/templates/2xx.html +++ b/templates/2xx.html @@ -17,7 +17,7 @@