DEV Community

gaganjot singh
gaganjot singh

Posted on

7 3

BEST CSS BORDER STYLE

check out More Example

GSCODE

1. First in series of pens where I just want to make a library of useful tricks I have used for websites. In this one, the key trick is multiline underline with any color I want. This is shown using a random gradient so I could practice some more javascript.

2. Features:

1) Clip-path for image masking rectangle border (webkit only).

2) Blend-mode for this mask.

3) Smart color system, just put your color name and value into sass map and then add proper class with this color name to elements and everything will work!

4) Cool credits side-menu (click small button in the center of demo).

5) Vanilla js with just < 200 lines of code (basically it's just adds/removes classes).

6) Reusable/configurable. I will add some comments to css/js code if I don't forget about it :D

P.S. - background-attachment: fixed does not working with transforms, so I tried to achieve completly static bg-image during mask movement with translateY, but bg-image was "jumpy", so right now bg-image simply goes up when mask rotates, which is ok for me.

3. Sass button border hover effect mixin

4. single element animation icon~

4. Animating border-radius

5. CSS-only border animation on hover. It needs a solid background in order to work.

Hot sauce if you're wrong - web dev trivia for staff engineers

Hot sauce if you're wrong · web dev trivia for staff engineers (Chris vs Jeremy, Leet Heat S1.E4)

  • Shipping Fast: Test your knowledge of deployment strategies and techniques
  • Authentication: Prove you know your OAuth from your JWT
  • CSS: Demonstrate your styling expertise under pressure
  • Acronyms: Decode the alphabet soup of web development
  • Accessibility: Show your commitment to building for everyone

Contestants must answer rapid-fire questions across the full stack of modern web development. Get it right, earn points. Get it wrong? The spice level goes up!

Watch Video 🌶️🔥

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay