Benjamin De Cock Profile Banner
Benjamin De Cock Profile
Benjamin De Cock

@bdc

24,750
Followers
130
Following
477
Media
20,898
Statuses

Designer. Formerly @stripe , @csswg .

Joined November 2007
Don't wanna be here? Send us removal request.
@bdc
Benjamin De Cock
6 years
The CSS Working Group agreed this morning on adding many math functions. We now have: โ€ข calc() โ€ข min() โ€ข max() โ€ข clamp() โ€ข sin() โ€ข cos() โ€ข tan() โ€ข acos() โ€ข asin() โ€ข atan() โ€ข atan2() โ€ข hypot() โ€ข sqrt() โ€ข pow() The face of CSS is rapidly changing.
230
3K
10K
@bdc
Benjamin De Cock
6 years
I moved to the Bay Area a month ago. Here are my first, unfiltered impressions:
Tweet media one
147
508
4K
@bdc
Benjamin De Cock
5 years
๐Ÿงต It's time for our industry to realize the title "frontend developer" is obsolete. The vast majority of these profiles are actually "JS engineers", and they're usually quite good at it, but they're not as good at all the other things contributing to great frontend experiences.
56
341
2K
@bdc
Benjamin De Cock
7 years
Fun fact about : while the hero image is loading, the header displays an inline SVG illustration blurred with a CSS filter แ••( แ› )แ•—
Tweet media one
Tweet media two
29
238
1K
@bdc
Benjamin De Cock
4 years
I recently left Stripe after 8 incredible years. Iโ€™m extremely proud of what weโ€™ve built, and Iโ€™ll be forever grateful for getting the chance to learn from the smartest, kindest, most humble and optimistic coworkers I could have ever hoped for.
57
12
1K
@bdc
Benjamin De Cock
3 years
I had a ton of fun designing and implementing and I thought I could share some of the pleasing technical details about it. ๐Ÿงต Thread:
25
82
1K
@bdc
Benjamin De Cock
4 years
New job, new tools: ๐Ÿ’ป Hardware โ€ข MacBook Pro M1: Biggest jump in performance I've ever experienced with a new Mac. โ€ข Pro Display XDR: Actually worth the price. I'm serious. ๐Ÿ’พ Software โ€ข Figma: Switching from Sketch, mostly for easier collaboration. โ€ข VS Code: Adios Vim.
Tweet media one
35
20
1K
@bdc
Benjamin De Cock
3 years
We're still in private beta and we barely have a site (page?) but, excited to share our baby steps nonetheless. Say hi to Increase!
61
15
965
@bdc
Benjamin De Cock
5 years
Just saw yet another tweet mocking CSS centering that went viral. This meme will never die, will it? It's literally *two* lines in CSS nowadays: display: grid; place-items: center;
34
96
943
@bdc
Benjamin De Cock
8 years
Friendly reminder: you don't need weird shenanigans to convert HTML strings to DOM nodes, there's a native API for that!
Tweet media one
13
332
920
@bdc
Benjamin De Cock
7 years
Donโ€™t change an elementโ€™s `display` for its side-effects, make your intent explicit instead! /* Remove the space below an image */ โŒ img {display: block} โœ… img {vertical-align: middle} /* Resize to fit the content */ โŒ div {display: inline-block} โœ… div {width: max-content}
14
174
900
@bdc
Benjamin De Cock
6 years
Quick example of an alternating two column layout made with CSS Grid:
Tweet media one
19
119
890
@bdc
Benjamin De Cock
5 years
`clip-path` makes it even easier to create our typical 12deg backgrounds in CSS ๐Ÿ’•
Tweet media one
17
89
799
@bdc
Benjamin De Cock
3 years
It seems like a very common practice now to define the color palette in CSS using custom properties mapped to hexadecimal values. That's suboptimal. I highly recommend to use a functional syntax instead so that you can easily change the alpha value if needed.
Tweet media one
24
76
765
@bdc
Benjamin De Cock
5 years
My favorite features in Chrome 76: 1๏ธโƒฃ <img src=foo.png loading=lazy> 2๏ธโƒฃ backdrop-filter: blur(10px) 3๏ธโƒฃ @media (prefers-color-scheme: dark)
5
109
626
@bdc
Benjamin De Cock
3 years
I didn't realize the new CSS dynamic viewport units were already implemented in @webkit \o/ That means all the viewport hacks and workarounds for iOS are coming to an end! Meet your new friend: body { height: 100dvh }
16
79
580
@bdc
Benjamin De Cock
3 years
TypeScript is like pair programming with this guy
Tweet media one
12
46
546
@bdc
Benjamin De Cock
7 years
Although CSS Grid shines with two-dimensional layouts, it's also often the best way to solve one-dimensional layouts. Quick example: a typical component header with a title on the left and actions on the right.
Tweet media one
11
65
540
@bdc
Benjamin De Cock
7 years
Friendly reminder: CSS Grid is often a cleaner, more robust way to stack elements than relying on absolute positioning.
Tweet media one
11
100
541
@bdc
Benjamin De Cock
6 years
7 years at Stripe ๐Ÿคฏ
8
1
545
@bdc
Benjamin De Cock
7 years
You feel like you keep writing align-items: center; justify-items: center; ? Thereโ€™s a shorthand for that! place-items: center;
10
110
521
@bdc
Benjamin De Cock
7 years
Friendly reminder: if you don't need IE/Edge support (e.g. internal tools), you don't have to reset every CSS property individually. button.lame { padding: 0; border: none; outline: none; font: inherit; color: inherit; background: none } button.cute { all: unset }
6
80
454
@bdc
Benjamin De Cock
6 years
Tweet-sized guide to low-cost investing: โถ Open a Vanguard account โท Invest your age in % in VSIGX โธ Invest 60% * (100 - age) in VTSAX โน Invest 40% * (100 - age) in VTIAX โบ Profit! So, say you're 30 with $20k to invest: โ€ข $6000 in VSIGX โ€ข $8400 in VTSAX โ€ข $5600 in VTIAX
9
23
444
@bdc
Benjamin De Cock
5 years
Little weekend project: a simple touch-friendly JS gallery! Download: Demo:
13
35
424
@bdc
Benjamin De Cock
7 years
Hey @Twitter , how about you invert these numbers?
Tweet media one
9
69
415
@bdc
Benjamin De Cock
6 years
Props to @firefox for being the first browser to implement the new `gap` property we introduced a year ago (). Quick example:
Tweet media one
@bdc
Benjamin De Cock
7 years
Did you want something like `grid-gap` in Flexbox? A new shared `gap` property has been accepted by the @csswg for Grid, Multicol & Flexbox!
0
11
54
12
88
408
@bdc
Benjamin De Cock
6 years
Just in case you need another reason to switch to @figmadesign :
12
37
395
@bdc
Benjamin De Cock
5 years
Love this feature in @sketch 55 ๐Ÿ’–
6
32
386
@bdc
Benjamin De Cock
7 years
My favorite thing about :
10
84
388
@bdc
Benjamin De Cock
3 years
If you're into print design and typography (and if not, you should), I highly recommend this book! ๐Ÿ‘Œ
Tweet media one
Tweet media two
Tweet media three
Tweet media four
6
7
373
@bdc
Benjamin De Cock
8 years
Also, looks like @apple 's designers are using @sketchapp :)
Tweet media one
12
105
356
@bdc
Benjamin De Cock
8 years
<script defer> your scripts and <link rel=preload> your fonts. Takes like 8 seconds to implement and makes your site a million times faster.
1
69
348
@bdc
Benjamin De Cock
6 years
Fun fact: the last 17 people to join @stripe 's design team are women! On a related note, we're hiring ๐Ÿ™ƒ
10
33
338
@bdc
Benjamin De Cock
3 years
We recently migrated and its internal pages to @nextjs . It's my first experience with it in production and now I just can't imagine using anything else โ€” the developer experience and out-of-the-box performance are simply outstanding!
Tweet media one
15
21
342
@bdc
Benjamin De Cock
7 years
Quick centering comparison between CSS grid and flexbox (spoiler: grid is a tad nicer).
Tweet media one
9
62
330
@bdc
Benjamin De Cock
6 years
Just realized that @stripe 's design team is now bigger than the size of the entire company when I joined.
6
7
324
@bdc
Benjamin De Cock
3 years
I tweeted earlier this month about upcoming CSS units making the dynamic iOS 15 viewport easier to deal with. To clarify, it's already possible to build app-like interfaces today with fixed elements and a fully adaptive viewport without any fragile hacks. Here's an example:
Tweet media one
6
31
319
@bdc
Benjamin De Cock
3 years
Friendly reminder: you don't need complex JS-based client-side navigation and routing to make your site fast to browse. A simple static HTML site and some basic prefetch hints are sufficient to make your site feel pretty much instant. is a good example.
6
19
314
@bdc
Benjamin De Cock
7 years
Figma is full of these it-just-works interactions you naturally do without considering if they might actually be supported or not ๐Ÿ‘Œ
15
30
312
@bdc
Benjamin De Cock
3 years
Lovely to see Apple embracing CSS Grid ๐Ÿ‘Œ
Tweet media one
1
15
312
@bdc
Benjamin De Cock
5 years
๐Ÿ’ธ Thread: Step-by-step guide to successful low-cost investing in the US with Vanguard.
6
13
314
@bdc
Benjamin De Cock
2 years
Once <link rel=prefetch> and the Shared Element Transition API are supported in all modern browsers, I'm not touching a single-page app ever again.
5
17
307
@bdc
Benjamin De Cock
2 years
TIL pseudo elements can be selected and animated with the Web Animations API!
3
27
301
@bdc
Benjamin De Cock
5 years
Specifically, most frontend developers have an abysmal knowledge of CSS, even though it's a crucial part of building fast, responsive, and smooth user interfaces.
7
28
282
@bdc
Benjamin De Cock
7 years
Design never becomes easier, you only keep pushing expectations higher.
4
64
281
@bdc
Benjamin De Cock
8 years
Firefox 52 releasedโ€”the CSS Grid revolution has begun!
Tweet media one
5
121
270
@bdc
Benjamin De Cock
10 years
Introducing http://t.co/4oAUUAfJTU --ย a minimal, UI-focused programming language for web designers.
37
203
273
@bdc
Benjamin De Cock
3 years
Safari Tech Preview 133 supports CSS Cascade Layers \o/
Tweet media one
9
32
276
@bdc
Benjamin De Cock
7 years
I have some exciting news to share: my family and I are moving to the Bay Area later this year! ๐ŸŽ‰โœˆ๏ธ ๐Ÿ‡บ๐Ÿ‡ธ
14
0
270
@bdc
Benjamin De Cock
8 years
Speed up your site by preloading the next pageโ€™s stylesheet (the ~300ms delay between hover and click will usually be enough to preload it).
Tweet media one
3
49
268
@bdc
Benjamin De Cock
8 years
Friendly reminder: external SVG files can be manipulated in JavaScript.
Tweet media one
6
75
263
@bdc
Benjamin De Cock
7 years
Most accordions on the web perform offensively poorly, notably because theyโ€™re animating expensive CSS properties like height. Doing it properly means relying on transform, which is much harder, but itโ€™s the only way to reach 60 FPS. Hereโ€™s an example:
13
31
256
@bdc
Benjamin De Cock
6 years
๐Ÿ”ฅ
Tweet media one
7
21
252
@bdc
Benjamin De Cock
3 years
I'm not a fan of Safari on Monterey so far. The tab bar's interaction design sounds smart in theory but it's a mess in practice. Even basic system-wide interactions like reordering tabs don't work anymore. And really, web developers shouldn't be able to tint the user's toolbar...
Tweet media one
23
19
242
@bdc
Benjamin De Cock
6 years
I come back to Figma every now and then to check its progress so, in order to test the latest version, I redesigned Figma in Figma ๐Ÿ™ƒ
9
8
248
@bdc
Benjamin De Cock
6 years
๐‘บeriously ๐‘ปhis ๐‘นole ๐‘ฐs ๐‘ทretty ๐‘ฌxciting
5
17
227
@bdc
Benjamin De Cock
5 years
Can we all agree the Unicode Consortium should approve this emoji, like, right now? Proposed name: "malicious thinking face".
Tweet media one
10
29
231
@bdc
Benjamin De Cock
8 years
Things all hotels do: - hide light switches - provide 17 more pillows than you need - require a PhD in thermodynamics for using the shower
3
51
226
@bdc
Benjamin De Cock
2 years
Quick behind-the-scenes thread on the new โ€” starting with the usage of the shiny <dialog> element! Customizing and animating dialog and ::backdrop isn't trivial, but you get a lot for free by relying on it and it's already supported by all modern browsers!
Tweet media one
9
8
227
@bdc
Benjamin De Cock
7 years
I had the chance to work on โ€” a topic I deeply care about and an initiative Iโ€™m proud weโ€™re undertaking. ๐ŸŒโค๏ธ
13
16
226
@bdc
Benjamin De Cock
3 years
Safari 15 finally gets a CSS grid inspector. I dig it!
Tweet media one
1
9
215
@bdc
Benjamin De Cock
3 years
I just visited Dribbble again for the first time in ages. Turns out it's still mostly the same fake, unusable, ostentatious and preposterous crap. Happy Monday!
Tweet media one
18
8
220
@bdc
Benjamin De Cock
7 years
As usual, @billlabus casually ships a ridiculously nice and overengineered landing page
7
23
216
@bdc
Benjamin De Cock
8 years
Some perf wins about : - no render-blocking scripts - no png/jpg - preloaded font - lazy-load of secondary resources
16
39
210
@bdc
Benjamin De Cock
8 years
Drawing basic shapes in CSS is now super easy thanks to the `clip-path` property
Tweet media one
8
37
206
@bdc
Benjamin De Cock
8 years
Confession: I measure things with โŒ˜โ‡ง4.
30
45
205
@bdc
Benjamin De Cock
3 years
โŒ transform: translateX(5px) โœ… translate: 5px โŒ justify-items: center; align-items: center โœ… place-items: center โŒ color: rgba(255, 255, 255, 0.4) โœ… color: #fff6 โŒ grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) โœ… grid: auto/auto-flow 1fr
9
20
210
@bdc
Benjamin De Cock
4 years
@JoshWComeau @Una (Not so) fun fact: I painfully designed Stripe's mesh gradients by drawing random shapes and blurring them. I then (also painfully) implemented them in SVG and CSS but couldn't reach a 60 FPS animation on all browsersโ€ฆ so we threw everything away and went with WebGL ยฏ\_(ใƒ„)_/ยฏ
5
3
205
@bdc
Benjamin De Cock
7 years
Six years ago today I timidly drew my first pixels for @stripe on a Mac mini (!) in Fireworks (!)
12
1
206
@bdc
Benjamin De Cock
5 years
The modern frontend developer is most often than not a "Jack of all trades" mastering JS (or even just a framework) and barely tolerating HTML/CSS as a necessary evil. That's understandable. I strongly think it's a different specialization, and it's too much for a single person.
9
20
198
@bdc
Benjamin De Cock
6 years
I realize it's a huge undertaking, but browsers absolutely need to make it possible to animate other properties than transform and opacity smoothly. Evangelism is just not working, most developers keep animating painfully expensive properties such as margin and padding like here:
6
17
204
@bdc
Benjamin De Cock
7 years
Apple's web designers are still very much at the top of their game. This is audacious, bold, and invigorating. Kudos to the team!
Tweet media one
Tweet media two
18
17
199
@bdc
Benjamin De Cock
7 years
zomg CSS Grid just landed in Edge, which means *all* modern browsers now support the new spec ๐Ÿ˜
7
68
194
@bdc
Benjamin De Cock
4 years
Hello, world -- it's been a while. Back to work after a (well-deserved?) break. Can't wait to share with you what I've just started working on! ๐Ÿง‘๐Ÿปโ€๐Ÿ’ป
11
0
196
@bdc
Benjamin De Cock
5 years
I dig the lock animation on the Apple logo here The implementation, however, is kinda questionable ๐Ÿ™ƒ
Tweet media one
12
9
189
@bdc
Benjamin De Cock
8 years
Well, this is it. Game over. @billlabus just won the internet.
10
35
185
@bdc
Benjamin De Cock
7 years
The new @framer is out, and it's really, really solid. The UI is polished af, performance is amazing, and best of all: the artboard rendering is done entirely in SVG, which means they avoid all kinds of fragile export shenanigans by being a true WYSIWYG. ๐Ÿ‘Œ
3
14
185
@bdc
Benjamin De Cock
7 years
I spent the last two weeks designing a new project with @figmadesign . Here are my quick, unfiltered impressions so far:
Tweet media one
7
15
180
@bdc
Benjamin De Cock
8 years
If you plan to use CSS Grid soon: 1) you're doing it right 2) keep your fallback rules separate so you don't penalize everyone in the future
Tweet media one
4
47
175
@bdc
Benjamin De Cock
6 years
tfw you can't even focus on what your coworker is teaching you because he keeps touching your immaculate display
10
21
170
@bdc
Benjamin De Cock
2 years
We're still early, and the untapped potential is intimidating, but I cannot wait to see what you build. Increase โ€” Build your bank.
10
7
165
@bdc
Benjamin De Cock
5 years
Tweet-sized iPhone 11 Pro review: ๐Ÿ’ฏ Most beautiful hardware Apple has ever released. ๐Ÿ“ฑ I still miss the size and weight of my iPhone 7 though. ๐Ÿ”‹ Battery life is incredible. This thing just won't die. โšก๏ธ Face ID is blazing fast and suspiciously reliable. ๐Ÿคฏ The cameraโ€ฆ damn.
13
10
162
@bdc
Benjamin De Cock
6 years
Although it's still not as good as @sketchapp (especially with the SVGO plugin), @figmadesign 's SVG export has improved dramatically in the last few versions! Here's a quick before/after comparison:
Tweet media one
7
10
161
@bdc
Benjamin De Cock
9 years
Nice job @sketchapp ๐Ÿ’ฏ
3
63
157
@bdc
Benjamin De Cock
8 years
Some of the pages we designed last year
5
17
157
@bdc
Benjamin De Cock
7 years
Chrome 62 ships with a new and shiny CSS Grid highlighter!
Tweet media one
2
39
159
@bdc
Benjamin De Cock
7 years
Our poster wall keeps getting better ๐Ÿ‘Œ
Tweet media one
6
3
159
@bdc
Benjamin De Cock
6 years
In hindsight, I'm not entirely sure it was a good idea to allow our engineers decorate the office walls.
Tweet media one
1
8
155
@bdc
Benjamin De Cock
7 years
The modern layout features CSS provides us are amazing, but don't forget they don't automatically invalidate or make the previous specs obsolete. Use what fits your needs and mental model :)
Tweet media one
6
26
151
@bdc
Benjamin De Cock
3 years
You don't have to build a fully custom <select> if you only want to tweak the select element itself but not its options. You can't just style the select element as the options inherit some styles from it on some browsers (color, font, etc.) but you can take a different approach:
Tweet media one
7
7
148
@bdc
Benjamin De Cock
6 years
I had the chance to get an early demo of Framer X, and let me tell you it's absolutely ๐Ÿ˜
6
12
148
@bdc
Benjamin De Cock
7 years
Woah I didn't realize the `pointer` feature of MQ Level 4 was already supported by most browsers!
Tweet media one
6
36
145