Bootcamp

From idea to product, one lesson at a time. To submit your story: https://tinyurl.com/bootspub1

Follow publication

Member-only story

🎨 Tailwind CSS trick: managing opacity with alpha values. 🎨

Xian
Bootcamp
Published in
2 min readSep 16, 2024
demo for changing the alpha value in the tailwind
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
:root {
--color-primary: 27 80 13;
}

.dark {
--color-primary: 217 50 50;
}
}
export default {
darkMode:'class',
theme: {
extend: {
colors: {
myCustomizeColor: 'rgb(var(--color-primary) / <alpha-value>)',
},
},
},
plugins: [],
}
<div class="mb-4">
<button class="h-12 w-24…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Bootcamp
Bootcamp

Published in Bootcamp

From idea to product, one lesson at a time. To submit your story: https://tinyurl.com/bootspub1

Xian
Xian

Written by Xian

📝 Writing unique, actionable articles rarely found elsewhere. 🎨 Crafting websites with industry-standard frameworks and advanced tools like GSAP.

No responses yet

Write a response