r/css • • Apr 28 '23

Graphic Designer vs CSS Developer

830 Upvotes

59 comments sorted by

19

u/Nefariousness93 Apr 29 '23

There was a stream yesterday on Twitch, guy named Jhey Tompkins built it, pretty sick, here's the Codepen link: https://codepen.io/jh3y/pen/LYgjpYZ

Edit: There's an Easter egg for both the dark mode and the light mode, just wait a bit.

3

u/Thefriendlyfaceplant Apr 29 '23

Thank you so much. I was looking for it.

118

u/omniron Apr 29 '23

Project manager: actually we’re using a button now

41

u/Logical-Idea-1708 Apr 29 '23

We should be able to just export that Figma widget as a web component. I don’t care if it’s rendering canvas underneath πŸ€“

6

u/Oesel__ Apr 29 '23

You can export animations as react/vue components with a plugin, anima its called i think. But its hella expensive

102

u/[deleted] Apr 28 '23

Damm, that is a nice toggle

73

u/ThunderySleep Apr 29 '23

It is. And if a designer ever handed me a comp of this to develop they'd better be my favorite coworker or I'm promptly telling them to fuck off.

4

u/Raredisarray Apr 29 '23

So true πŸ˜‚πŸ˜‚

8

u/[deleted] Apr 28 '23

Haha, both can agree on that.

55

u/earlyryn Apr 28 '23

I would just export video and roll playback on click

23

u/poof_he_is_gone Apr 29 '23

Sounds accessible

27

u/AkhilxNair Apr 29 '23

Oh yes, you can access it via mouse click

3

u/MrFireWarden Oct 09 '23

This guy WCAGs

2

u/earlyryn Apr 29 '23

You can always sprinkle some aria roles aria labels on to it

19

u/adhaas85 Apr 28 '23

I'm crying

9

u/kalikaya Apr 29 '23

Who needs a toggle like that?

3

u/MrPrimalNumber Apr 29 '23

No one. I used to teach web design. That toggle would not get a good grade from me.

1

u/[deleted] Oct 19 '23

Really?

2

u/MrPrimalNumber Oct 19 '23

Really really?

0

u/[deleted] Oct 19 '23

Who needs 3000 grit sandpaper? Someone who wants polish.

9

u/Perpetual_Education Apr 29 '23

Graphic designers knowingly making thing without a care for how it will be implemented or how the web works is very common.

Not sure how this is funny though. It’s sad. It’s a waste of resources. They could just with together. Check out this toggle that was planned with CSS to start https://method.ac/

6

u/ThunderySleep Apr 29 '23

Yes. The question of "do I need to learn to code?" comes up in /r/web_design often, and every time, I explain if you don't know HTML/CSS (you don't have to be a master, but at least be capable of coding your own layouts whether you're efficient at it or not), you're not a web designer, you're a graphic designer.

5

u/Perpetual_Education Apr 30 '23

β€œDo we need to know how our medium works?” (Probably should) ;)

3

u/ThunderySleep Apr 30 '23

That's how I hear it, yet I still get people flipping out arguing tooth and nail that designers shouldn't have to know any code whatsoever.

5

u/Valator_ Apr 29 '23

Looks fun to build and frustrating at the same time

4

u/nrsldr Apr 29 '23

Where can I find the full video? The CSS result sounds amazing.

2

u/queen-adreena Apr 29 '23

I’m gonna go out on a limb and say on TikTok under the username never.more17 :)

But to save you the trouble, this video is just the original with worse resolution and a fade-to-black removed.

2

u/nrsldr Apr 30 '23

I saw the video of never.more17, but it looks like the bottom video comes from a tutorial...

2

u/djquackyquack Apr 28 '23

This is really talented and unique

2

u/[deleted] Apr 28 '23

This has me feeling some kind of way.

2

u/iamhydr0gen Apr 29 '23

This is beyond relatable

3

u/[deleted] Apr 29 '23

Why css is necessary in this context? Wouldn't it be easy to just design it graphically?

5

u/sentencevillefonny Apr 29 '23

It still has to function.

1

u/steelfrog May 02 '23
:checked { background-image: checked.svg }

Though you don't get that fancy slide. Point is that there are simpler ways to do this that doesn't involve manually placing shapes. It's a cool demo and certainly impressive but I'd be weary of using something that complex in prod.

1

u/sentencevillefonny May 03 '23

I’ve never worked anywhere that would implement a button this complex but honestly, it would be fun to see it in action.

1

u/ShortFuse Apr 29 '23

The CSS isn't the hard part.

It's actually the JS needed to handle touch/mouse events to support dragging as well as clicking. Also, keyboard should click on spacebar press. Not to mention the aria tags to specify the state.

The worst part is you're about halfway through and then realize there no accessible hover or focus state in the CSS design and then the team can't wait for a new redesign, resulting in your manager telling you to slap a generic toggle.

3

u/philmayfield Apr 29 '23

My gut would be to build this on top of a checkbox to handle accessibility and state concerns.

1

u/Satankid92 Apr 29 '23

Literally no one cares about a toggle like that, worth visiting sites people use on their daily basis don’t use useless designs, it’s better to put that effort in things that the user will actually use more often

0

u/[deleted] Apr 30 '23

[deleted]

1

u/cyg_cube Apr 29 '23

now make it compatible with all the browsers and devices

1

u/2WheelFilms Apr 29 '23

Wouldnt you be able to do this with lottie?

Idk ive hear about svg animation

-12

u/-bakt- Apr 29 '23

for me css is not programming, still design

33

u/[deleted] Apr 28 '23 edited Jan 19 '26

[removed] β€” view removed comment

6

u/Fuih22 Apr 29 '23

I'm noob so I have a question, does SVG handle the sliding animation too ?

10

u/Thefriendlyfaceplant Apr 29 '23

Yes. Though there are always libraries like Gsap for more advanced vector animations, like morph. Or even no code tools to animate the vectors like Rive.

4

u/Fuih22 Apr 29 '23

Thank you, that's pretty cool. I always thought we either have to use gif or just pure css to handle animation.

7

u/Thefriendlyfaceplant Apr 29 '23 edited Apr 29 '23

Pure CSS:
https://codepen.io/AnnieChn/pen/JEQXyB

Gsap:
https://codepen.io/GreenSock/pen/rOjeRq

Rive:
https://www.youtube.com/watch?v=fR1s2KML_ok

So if you really want to dig deep into web animation. Then Adobe Illustrator is what you'd want to learn first. Especially the pathfinder tool, simplifying shapes, outline stroke, all that. All those things will get you on to the path of what that 'Graphic Designer' is doing in the meme.

EDIT: Oh and something beginners often overlook is clippath. Easy way to get simple (animatable) shapes in CSS.

https://bennettfeely.com/clippy/

2

u/phoneaccount10 Apr 29 '23

Lottie svg animations would also solve this

2

u/ThunderySleep Apr 29 '23 edited Apr 29 '23

SVG is a vector graphic made of XML, which gives you nodes very similar to HTML and can be styled, thus animated, with CSS.

1

u/noworries_13 May 02 '23

Do you actually know tech or just apps? Why does my Xbox keep changing picture settings? It will be at 4k hdr, then I turn it on and it's somehow set at 720p. Why?

1

u/ThunderySleep Apr 29 '23 edited Apr 29 '23

SVG gives you the shape, then you'd animate it in CSS. For really simple shapes, I still used CSS to style an HTML element. For example, when I do a basic hamburger nav, I'll just use <span> tags for the bars and animate them. But when you're going large or complicated animations, you ought to be working with SVGs.

"CSS developer" is a little awkward phrasing, because you'd just call that person a developer, or front end developer. But in any case, SVG and CSS are working together to create this. You'd just be making the shape with an SVG, but still styling and animating with CSS.

20

u/Spidermane420k Apr 28 '23

πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“πŸ€“

4

u/TheJase Apr 29 '23 edited Jan 19 '26

worm ask memorize dog snails history cagey fact badge encouraging

This post was mass deleted and anonymized with Redact

4

u/ShortFuse Apr 29 '23

SVG animations repaint every frame. Use cautiously. Pure CSS is much harder to do, but smoother.

0

u/TheJase May 03 '23 edited Jan 19 '26

yam stocking label relieved support wakeful innate vegetable money boat

This post was mass deleted and anonymized with Redact