Jobb Smooth (@jobb) header
Jobb Smooth (@jobb) profile picture

a fictional character

Bangkok, Thailand
Joined February 2008
Photo by Jobb Smooth (@jobb)Photo by Jobb Smooth (@jobb)Photo by Jobb Smooth (@jobb)
Review the brain from a 360-degree viewpoint 🔄🧠 Examine brain structures from a 360-degree viewpoint, make various incisions and slices, read more about the areas, and download images of the brain. Access our 3D Brain Atlas here: neurotorium.org/tool/brain-a…
101
1,117
80
5,182
2,378,853
CSS Trick 🤙 You can create these tab bar controls by using :has() to count the number of tabs ⭐️ .tabs:has(input:nth-of-type(3)){--count: 3;} .tabs:has(:checked:nth-of-type(3)){--active: 200%;} .tabs::after{ translate:var(--active) 0;} Let's break it down in this <noscript>! 📼 Couple of CSS :has() tricks here combined with custom properties 😎 First things first, lay out the tabs using display: grid. This gives you a way to create equal-width tabs 🙏 .tabs { display: grid; grid-auto-flow: column; } Then you use :has() to count the number of tabs and store that in a custom property 🤓 .tabs:has(input:nth-of-type(3)) { --count: 3; } .tabs:has(input:nth-of-type(4)) { --count: 4; } Using the cascade, the last valid :has() gives you the number of tabs 🫶 Using the tab count, you can size the tab indicator. For the tab indicator, use the tabs pseudoelement: .tabs::after { content: ""; position: absolute; height: 100%; width: calc(100% / var(--count)); } See how you can use --count to determine its size 📏 Next, use :has() to determine which tab is active or :checked with input [type=radio] .tabs:has(:checked:nth-of-type(2)) { --active: 1; } .tabs:has(:checked:nth-of-type(3)) { --active: 2; } You can use a zero-indexed translation here. If the second input is :checked, set --active: 1, then translate the pseudoelement on the tabs to that position 👉 .tabs::after { translate: calc(var(--active, 0) * 100%) 0; } Or you could set active to the translation: .tabs:has(:checked:nth-of-type(2)) { --active: 100%; } Setting the custom property allows you to use the index elsewhere if you need it 🤙 The final piece is using mix-blend-mode 👀 The tabs have a black background-color, the pseudoelement is white, and the label text is white. When you use mix-blend-mode: difference on the pseudoelement it will give this effect that the text transitions from white to black sliding across 😎 .tabs::after { color: hsl(0 0% 100%); mix-blend-mode: difference; } You can totally mix up the colors here though and go with a different effect. The mechanics of how you can use CSS :has() is the main point here 🙏 As always, any questions, suggestions, etc. let me know @CodePen link below! 👇 (There's even a @tailwindcss play for this one too 👀)
CSS Tip! 💪 You can create these tab controls with CSS :has() + radio buttons ✨ .tabs:has(input:nth-of-type(3)) { --count: 3; } .tabs:has(:checked:nth-of-type(3)) { --active: 2; } .tabs::after { translate: calc(var(--active, 0) * 100%) 0; width: calc(100% / var(--count)); } Two CSS :has() tricks here combined with a rendering trick 🤙 The tab control is a container using display: grid. You can use :has() to count the number of tabs in the container: .tabs:has(input:nth-of-type(3)) { --count: 3; } .tabs:has(input:nth-of-type(4)) { --count: 4; } Using the cascade, the last valid :has() gives you the number of tabs 🫶 Once you know the number of tabs, you know how to size the indicator: .tabs::after { content: ""; position: absolute; height: 100%; width: calc(100% / var(--count)); } It's a pseudoelement that uses --count to determine its size 📏 The next :has() trick is determining which tab is active or :checked as it's an input [type=radio] .tabs:has(:checked:nth-of-type(2)) { --active: 1; } .tabs:has(:checked:nth-of-type(3)) { --active: 2; } You can use a zero-indexed translation here. If the second input is :checked, set --active: 1, then translate the pseudoelement on the tabs to that position 👉 .tabs::after { translate: calc(var(--active, 0) * 100%) 0; } The last rendering trick is using mix-blend-mode 👀 The tabs have a black background-color, the pseudoelement is white, and the label text is white. When you use mix-blend-mode: difference on the pseudoelement it will give this effect that the text transitions from white to black sliding across 😎 .tabs::after { color: hsl(0 0% 100%); mix-blend-mode: difference; } You can totally mix up the colors here though and go with a different effect. The mechanics of how you can use CSS :has() is the main point here 🙏 As always, any questions, suggestions, etc. let me know @CodePen link below! 👇 (There's even a @tailwindcss play for this one too 👀)
9
66
2
540
70,828
Hidden Logo Designs 🧵 Toyota’s logo contains each letter in the brands name. 1/26
78
912
91
7,311
1,500,261
For you aspiring Vision Pro designers! 🥽 New Human Interface Guidelines for Vision Pro (we added ~60k words of wisdom!!) developer.apple.com/design/h… 🎨 Figma Vision Pro design kits developer.apple.com/design/r… 🍏App icon tool (for previewing juicy 3d icons) itunespartner.apple.com/asse…
46
633
51
3,862
731,624
Jobb Smooth retweeted
441
4,614
274
81,442
2,630,926
Linux sysadmin forced to join a meeting
131
2,214
239
19,332
1,696,309
311
1,277
594
17,025
3,553,830
Success isn’t linear
87
1,553
189
8,369
739,290
You can reduce the number of DOM elements and DOM operations _by a lot_ and speed things up as a result by highlighting things with the CSS Custom Highlight API (developer.mozilla.org/en-US/…).
6
14
4
152
32,577
Quetzalcoatlus northropi model next to a 1.8m man. The largest known flying animal to ever exist.
1,023
4,956
1,806
49,683
8,874,521
This 1840 desk is next level
408
6,181
706
35,816
3,453,993
Jobb Smooth retweeted
The perfect pizza menu doesn’t exi… tiktok.com/t/ZTRTjYugQ/
79
2,001
155
16,127
682,112
I wrote an essay called "Grid World" for the latest issue of The HTML Review (thehtml.review). Read it here: alex.miller.garden/grid-worl… I had a really fun time creating the graphics that accompany the essay!
15
127
15
997
144,555
Jobb Smooth retweeted
10 Principles of Motion Design Based on the Disney's twelve basic principles of animation 📷: @jrcanest
9
389
3
2,526
136,926
Jobb Smooth retweeted
Launched another @framer site –– simplthings.ca 🍸
29
47
4
806
130,073
Jobb Smooth retweeted
It never crossed my mind that you could ease a gradient, and and how much better it looks - until Tobias did it for Rotato's new timeline mastodon.social/@tobiasdm/10…
15
69
5
1,035
248,161
ถ้ามีเวลา 10-20 นาที ชวนอ่านมาก่อนเด้อ Spaces เปิดสไลด์บ่ได้ ถ้าพอเห็นโครงสร้างตัวประกาศ+ตัวพรบหลัก มาก่อน จะได้จินตนาการตามได้ ใน #พรบคอม หลัก มาตราที่เกี่ยวคือ 14 ฐานความผิด 15 การรับผิดไปด้วยของผู้ให้บริการ (ที่ประกาศนี้จะยกเว้นให้) 20 ขั้นตอนปิดกั้นแบบปกติ (ใช้อำนาจศาล)
ชวนคุยประเด็นร้อน 🔥กระทรวงดีอี ออกประกาศฉบับใหม่ ผู้ให้บริการอินเทอร์เน็ตต้องลบเนื้อหาผิดพ.ร.บ.คอมฯ ภายใน 24 ชม. ถ้าโพสต์ด่าประยุทธ์จะโดนลบไหมเนี่ยยย? ประกาศนี้เป็นยังไง มีปัญหาไหม มาคุยมาฟังกัน วันศุกร์ที่ 16 ธ.ค.65 19.00 น. ทางทวิตเตอร์สเปซ teapawt.net/i/spaces/1OwxWwbbVEkxQ
1
51
1
25
21,906
Jobb Smooth retweeted
Apple Maps makes it so easy to get around Tokyo. I just scan the buildings around me with my iPhone 14 Pro camera to generate walking directions exactly as they appear.
63
181
28
2,789
408,574