Last active
April 12, 2023 15:38
-
-
Save quincynyan/eb80fb416462be5ddcc1d7865aba62c4 to your computer and use it in GitHub Desktop.
CSS for Discord mention/tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Use | |
<span | |
class="mention wrapper-1ZcZW- interactive" | |
aria-expanded="false" | |
role="button" | |
> | |
@ExampleUsername | |
</span> | |
*/ | |
.mention { | |
border-radius: 3px; | |
padding: 0 2px; | |
} | |
.interactive { | |
-webkit-transition: background-color 50ms ease-out, color 50ms ease-out; | |
transition: background-color 50ms ease-out, color 50ms ease-out; | |
cursor: pointer; | |
} | |
.wrapper-1ZcZW- { | |
border-radius: 3px; | |
padding: 0 2px; | |
font-weight: 500; | |
unicode-bidi: -moz-plaintext; | |
unicode-bidi: plaintext; | |
color: 235 calc(1 * 86.2%) 88.6%; | |
background: hsl(235 calc(1 * 85.6%) 64.7%/0.3); | |
} | |
.mention.interactive:hover { | |
text-decoration: underline; | |
} | |
.interactive:hover { | |
color: hsl(0 calc(1 * 0%) 100%/1); | |
background-color: hsl(235 calc(1 * 85.6%) 64.7%/1); | |
} | |
.mention { | |
border-radius: 3px; | |
padding: 0 2px; | |
} | |
.interactive { | |
-webkit-transition: background-color 50ms ease-out, color 50ms ease-out; | |
transition: background-color 50ms ease-out, color 50ms ease-out; | |
cursor: pointer; | |
} | |
.wrapper-1ZcZW- { | |
font-weight: 500; | |
unicode-bidi: plaintext; | |
background: hsl(235 calc(1 * 85.6%) 64.7%/0.3); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Better version: