Konstantin Dankov (@kdankov) header
Konstantin Dankov (@kdankov) profile picture

HTML & CSS, Design, UI, UX, Vim, Terminal, DevOps, Home Automation

Sofia
Joined November 2008
Photo by Konstantin Dankov (@kdankov)Photo by Konstantin Dankov (@kdankov)Photo by Konstantin Dankov (@kdankov)Photo by Konstantin Dankov (@kdankov)Photo by Konstantin Dankov (@kdankov)Photo by Konstantin Dankov (@kdankov)Photo by Konstantin Dankov (@kdankov)Photo by Konstantin Dankov (@kdankov)Photo by Konstantin Dankov (@kdankov)
Konstantin Dankov retweeted
soon
73
75
16
1,858
44,719
Konstantin Dankov retweeted
morphing popover menu 🪄 css can let you detect the active anchor position @​container anchored(fallback: --top-left) popover stays full size; content grows from the grid origin that the fallback sets ↓
yes and no 🤙 in Chrome, yes. jus' need a little CSS to work out which side the popover opens on. if you don't need that, you can do it with html + css alone ✨ teapaw.org/jh3yy/status/201634258…
5
22
2
249
15,743
Konstantin Dankov retweeted
psa: keep your css :has() rules tight 🙇‍♂️ no wildcards, broad targets .component:has(.something) button 🚫 agents love slappin' :has() on a landmark but that has the potential to cause huge style recalcs from rules you might think are unrelated 🧑‍🔬
15
18
3
209
10,874
Today is a good day! Time to check in on the bobs #bobiverse This will be epic!
1
31
Konstantin Dankov retweeted
update: now you can use css progress() for adaptive radius, shadow, etc. ↓ same trick, but progress() does the division + clamps for you! 🧑‍🍳 .card__surface { --r: 42px; --g: 24px; border-radius: calc( progress((100vi - 100cqi) / 2, 0px, var(--g)) * var(--r) ); }
a little css trick i like ↓ adapt the radius gradually based on available space shrink from --r to 0 within --g 🧑‍🍳 .card__surface { --r: 42px; --g: 24px; border-radius: clamp( 0px, (100vi - 100cqi) / 2 * var(--r) / var(--g), var(--r) ); }
17
52
4
884
51,371
Konstantin Dankov retweeted
What do you call an emotionally in tune web typographer? An empath
3
1
18
4,233
Konstantin Dankov retweeted
they should've called it "artificial knowledge" rather than artificial intelligence
62
95
7
1,587
55,406
Konstantin Dankov retweeted
Having a Design Engineer (aka UX Engineer) on your team is a game changer. Attention to detail, product quality, velocity, all benefit from this hybrid role. Yet most tech companies overlook the importance of having people that excel at “front-of-the-front-end” work.
5
41
3
239
20,347
Konstantin Dankov retweeted
Here it is with DevTools open 👀 Can slow down those cross-document View Transitions and see the network requests coming in 🤙 Could totally spend time tweaking different parts of the transition, timing, etc. ✨
Wild that you can build this whole UI with CSS and MPA View Transitions alone 🤯 @​view-transition { navigation: auto; } Each view is a different route ✨
7
21
1
314
33,953
Konstantin Dankov retweeted
no js
💡 CSS Tip! Using scroll-driven animations, you can link a CSS variable with a range slider and easily update its value! No more JavaScript to do this. A few lines of CSS, one HTML element and you can update any value in real time. @CodePen demo in the reply 👇
2
5
69
7,598
🔗 Alternatives to Using Pure Black (#000000) for Text and Backgrounds uxplanet.org/alternatives-to… #a11y #design
78
943
76
9,555
754,609
Really awesome talk to open CSS Day. All presentations are worth watching btw. Web Design Engineering With the New CSS | Matthias Ott | CSS Day 2024 youtube.com/watch?v=su6WA0kU…
38
Konstantin Dankov retweeted
Replying to @KevinJPowell
Auto margins with flexbox. It usually reduces so much code, but I hardly see people using it. People know it, but don’t seem to be using it when required. Here’s an article I found - css-tricks.com/the-peculiar-…
2
5
1
86
5,162
New course by @lydiahallie: Testing Your JavaScript Knowledge! Challenge yourself with 50 interactive quiz questions on the event loop, scopes and closures, the "this" keyword, classes and prototypes, garbage collection, and more frontendmasters.com/courses/…
1
15
2
155
25,943
Konstantin Dankov retweeted
Replying to @alvaro_montoro
Overcomplicating that animation. Never got to share these publicly, but here's a simple rolling square codepen.io/thebabydino/pen/d… ... one going around a band codepen.io/thebabydino/pen/d… - a more complex version See also codepen.io/thebabydino/pen/Q… - but this can also be simplified
2
1
4
161
Konstantin Dankov retweeted
For today's toggle, I wanted to create a spinning experience... but I wasn't convinced by it, so I ended up creating two alternatives 😅 I personally like the third one. What do you think? Demos on CodePen: codepen.io/alvaromontoro/pen… codepen.io/alvaromontoro/pen… codepen.io/alvaromontoro/pen…
3
2
26
1,570