PERF: Replace slow :has selectors with body classes (#29581)

This commit is contained in:
David Taylor 2024-11-04 23:06:13 +00:00 committed by GitHub
parent b124736a1c
commit 1b5a7be3d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 4 deletions

View File

@ -6,7 +6,7 @@
}}
{{hide-application-header-buttons "search" "login" "signup" "menu"}}
{{hide-application-sidebar}}
{{body-class "login-page"}}
<div class="login-fullpage">
<FlashMessage @flash={{this.flash}} @type={{this.flashType}} />

View File

@ -1,7 +1,7 @@
{{! template-lint-disable no-duplicate-id }}
{{hide-application-header-buttons "search" "login" "signup" "menu"}}
{{hide-application-sidebar}}
{{body-class "signup-page"}}
<div class="signup-fullpage">
<FlashMessage @flash={{this.flash}} @type={{this.flashType}} />

View File

@ -9,14 +9,17 @@
flex-direction: column;
}
#main-outlet:has(.login-fullpage, .signup-fullpage, .invites-show) {
body.login-page,
body.signup-page,
body.invite-page {
& ~ .powered-by-discourse,
.above-main-container-outlet {
display: none;
}
}
body:has(.login-fullpage, .signup-fullpage) {
body.login-page,
body.signup-page {
background-color: var(--secondary);
}