Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web Theme: Refine Selectors (Fixes #132) #143

Merged
merged 5 commits into from
Apr 28, 2023
Merged

Conversation

Foldex
Copy link
Contributor

@Foldex Foldex commented Apr 28, 2023

Decent amount of selector changes, partially to avoid theming Big Picture, partially a general cleanup.

Big Picture

Steam provides a useful node ID for avoiding this:

#SteamDesktop

But as it isn't a top level node, tooltips and other hover elements that like to get injected as a direct child of body will bypass this. For these we have to resort to using a :not() selector on the body class itself.

body:not([class*="gamepadui_GamepadUIPopupWindowBody_"])

Cleanup

Did a bit of cleanup to avoid straight up using:

[class*="etc_etc"]

type selectors. Now most selectors include the tag of the element they're targeting:

span[class*="etc_etc"]

Which should at least be a slightly less blatant abuse of wildcard selectors. Moving forward we should avoid tagless selectors when possible.
There are a couple stragglers left where I couldn't easily trigger the corresponding elements to show, like with cloudconflict_.

Dialog selectors that were too general have been constrained to .ModalDialogPopup:

.ModalDialogPopup span[class*="etc_etc"]

@tkashkin tkashkin merged commit 9318058 into tkashkin:master Apr 28, 2023
@Foldex Foldex deleted the selectors branch May 5, 2023 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants