Fix CSS performance issues from #857 while preserving functionality (#928)

## Description:
Replaces the `all` selector with a specific class to reduce CSS
computation. Maintains functionality of hiding the news button.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

`demonessica`
This commit is contained in:
Demonessica
2025-05-29 15:17:15 -07:00
committed by GitHub
parent aca8d738a8
commit c2063cd73b
+8 -1
View File
@@ -99,6 +99,11 @@
display: none;
}
}
/* display:none if child has class parent-hidden since we can't use shadow DOM in Lit due to Tailwind */
.component-hideable:has(> .parent-hidden) {
display: none;
}
</style>
<!-- Immediate execution to prevent FOUC -->
@@ -224,7 +229,9 @@
<div class="container__row">
<flag-input class="w-[20%] md:w-[15%]"></flag-input>
<username-input class="relative w-full"></username-input>
<news-button class="w-[20%] md:w-[15%]"></news-button>
<news-button
class="w-[20%] md:w-[15%] component-hideable"
></news-button>
</div>
<div></div>
<div>