Skip to content

Instantly share code, notes, and snippets.

@Kcko
Last active March 12, 2025 10:53
Show Gist options
  • Save Kcko/3a1932657e0870218aeb5fb51f7215e1 to your computer and use it in GitHub Desktop.
Save Kcko/3a1932657e0870218aeb5fb51f7215e1 to your computer and use it in GitHub Desktop.
<!-- works only for color from config not defined like css variables -->
<!--v2 -->
<div class="ring-msp-red-default/30"></div>
<!--v3 -->
<div class="ring-msp-red-default ring-opacity-30"></div>
<!-- Hack if color is defined like css variable in config -->
'my-red': 'var(--primary-color)', // '#ba0c2f',
<!--v2 hack -->
does not exist
<!--v3 hack -->
ring-[color-mix(in_srgb,theme(colors.my-red)_50%,transparent)]
<!--v4 -->
no hack needed, v4 is functional (read doc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment