Skip to content

Conversation

@yofukashino
Copy link
Contributor

Adds UTC (Universal Theming Classes) that appends stable class names [For example utc_xyz] to elements, so theme devs don’t have to worry about class rerolls, only structural changes.
Helps with theming by removing the need for wildcard selectors, which also improves performance.

The idea is to get it adopted across other client mods too, to make theming easier and consistent. Already PR'ed at replugged and vencord.

Copy link
Member

@redstonekasi redstonekasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine-ish in terms of code to me. I'd change the patch replacement to be as minified as possible, this sometimes aids in compatibility between different extensions.
The one concern I do have is about the necessity of this plugin, CSS selectors can already do what this plugin accomplishes without much trouble. We do not have any policies in place that would prevent this extension from being submitted so don't consider this a disapproval, just something to consider.

@Cynosphere
Copy link
Member

I personally want to see the stance of the other aforementioned mods before deciding to try and spearhead this knowing that there is a chance that very few are going to use it

@yofukashino
Copy link
Contributor Author

yofukashino commented Jul 1, 2025

CSS selectors can already do what this plugin accomplishes without much trouble

Yeah, I did say "Helps with theming by removing the need for wildcard selectors, which also improves performance."
Wildcards cause lag and direct classes break with reroll. This is the middle ground I found.

I personally want to see the stance of the other aforementioned mods

I am waiting for that as well before try and add this to BD/Shelter

@Cynosphere
Copy link
Member

Wildcards cause lag

This didn't used to be the case and is an upstream Chromium issue ever since like around 132.x.x.x. The problem is I doubt they would care to try and fix it because "yOu'Re NoT sUpPoSeD tO uSe AdVaNcEd SeLeCtOrS" for normal webdev.

@yofukashino
Copy link
Contributor Author

This didn't used to be the case and is an upstream Chromium issue ever since like around 132.x.x.x. The problem is I doubt they would care to try and fix it because "yOu'Re NoT sUpPoSeD tO uSe AdVaNcEd SeLeCtOrS" for normal webdev.

well using them with has and similar functions will cause lag no matter what. unless you use > but still quite a lot of lag. dont ask me how i know

@Cynosphere
Copy link
Member

:has() has always been a performance issue, which is why it took years for it to even get mainstreamed.

@yofukashino
Copy link
Contributor Author

.utc_bar > .utc_title {
  pointer-events: unset;
  padding: 0;
  justify-content: flex-start;
  margin-left: 0.5em;
}
.utc_bar > .utc_title > div {
  display: none;
}
.utc_bar > .utc_title::after {
  color: var(--text-default);
  position: absolute;
  top: 4px;
  padding: 4px 9px 3px;
  font-size: 14px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  font-family: var(--font-headline);
  content: "Discord";
}

CSS Snippet if you wanna try this extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants