THE BEST SECRET EVER:

button{ all:unset; } now you can style your button however you want!
5 Replies
MarkBoots
MarkBoots10mo ago
It's not the best secret ever; not a secret, not the best. Unsetting all styles might inadvertently affect the accessibility of the button. user style sheets are there for a reason. You have to make sure that the button remains usable and understandable for users, including those using assistive technologies. Only change what is necessary. Also, this isn't really a question, so I wonder why you posted this in the front-end help channel (....and why it has to be in all caps)
EIO
EIO10mo ago
lol @Skriti mož I think the best secret ever really is that when ever you see something you don't understand "hindering" you from doing what you want, you should first think of WHY it is there before you think of how to remove it
Skriti mož
Skriti možOP10mo ago
Thanks @eioluseyi @MarkBoots I was excited Not so much now But what functionality would css disable for the button that's usable?
EIO
EIO10mo ago
For one, it takes away the default focus states, which many people actually go on specifically remove 😂 It basically becomes like a <span /> Only aria values will let screen readers know that it's a button, but people with other accessibility needs would most likely be lost on your UI. You might think you'd get to cover all bases when add your "custom UI", but honestly, A11y has 11 in it for a reason (jokingly serious 😅 )
Skriti mož
Skriti možOP10mo ago
Thanks, didn't know about this
Want results from more Discord servers?
Add your server