正在加载视频...

视频加载失败

CSS variables are live and they are POWERFUL. Now Live on Product Hunt 🚀 ➡️ Create a design system "So you can stay consistent and build much quicker." Define global styles like colors, gradients, sizes, and box shadows. ➡️ Use your variables everywhere "So you never have to manually...

15,496 次观看 • 1 年前 •via X (Twitter)

9 条评论

Webstudio 的头像
Webstudio1 年前

Learn more about CSS Variables

Webstudio 的头像
Webstudio1 年前

Learn about creating micro-interactions with CSS Variables

Open Props 的头像
Open Props1 年前

Rad work!

Webstudio 的头像
Webstudio1 年前

🙏

Andrey Vinitsky 的头像
Andrey Vinitsky1 年前

🚀

Alex K 的头像
Alex K1 年前

Nice feature addition! Keep developing 👍

Ricardo Ferreira 的头像
Ricardo Ferreira1 年前

Another great update, just have asked this a few weeks ago and it comes with extra cream and cherry on top

Benjamin Preiss 的头像
Benjamin Preiss1 年前

Great job! Are these compatible with webflow variables? I.e. can I use the relume components from @UntitledUI?

Jakob Sturm 的头像
Jakob Sturm1 年前

Huge news!

相关视频

CSS Trick! 🤙 You can create gradient borders on translucent elements using mask-clip and mask-composite with a pseudo-element 🔥 .gradient-border::after { mask-clip: padding-box, border-box; mask-composite: intersect; mask: linear-gradient(transparent, transparent), linear-gradient(white, white); } It's the same "Transparent border trick" from before. But, now you apply it to a pseudo-element 😎 The trick is to create a pseudo-element with a gradient background and then mask it so we only see the part we want, the border ✨ mask-clip defines the area affected by a mask. Similar to how you can define background-size. Using padding-box and border-box constrains the two masks. mask-composite is the magic part ✨ It defines a compositing operation for stacked mask layers. Using intersect means that the parts that overlap get replaced. And this seems to work in all browsers 🙌 As for the rest of the styles... – Make sure you set pointer-events: none on the pseudo-element – Make sure it fills the parent element. You can use position: absolute and inset: 0 – Make sure the background fills the space including the border-width. You can use calc to achieve that: --bg-size: calc(100% + (2px * var(--border))); background: var(--gradient) center center / var(--bg-size) var(--bg-size); That's it! 🚀 Gradient borders on translucent elements. You can set all the backdrop-filter: blur() you like! 😅 CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

269,739 次观看 • 2 年前