Lompat ke konten utama
EP 118

Ngobrolin Fitur Terbaru CSS bersama @AdamArgyleInk dan Bramus @ChromeDevs

Ringkasan Episode

Bantu Koreksi

Episode ini membahas CSS Wrap 2024 bersama Adam Argyle dan Bramus, dua Developer Relations Engineer dari tim Chrome yang fokus pada CSS dan UI. Mereka berbagi cerita di balik layar pembuatan CSS Wrap 2024, sebuah website interaktif yang merangkum perkembangan CSS sepanjang tahun 2024 dalam bentuk scrollytelling dengan tema retro game 8-bit. Diskusi mencakup berbagai topik penting termasuk perkembangan web modern, termasuk peran Adam dan Bramus sebagai DevRel, serta berbagai fitur CSS unggulan seperti Scroll Driven Animations, View Transitions, CSS Nesting, dan Field Sizing. Mereka juga menjelaskan pendekatan mereka dalam menjembatani developer, engineering tim, dan standard body untuk membuat fitur web yang lebih baik dan mudah digunakan.

Poin-poin Utama

  • CSS Wrap 2024 adalah website interaktif yang merangkum semua perkembangan CSS tahun 2024 dengan tema retro game 8-bit, dibangun menggunakan Astro dan menampilkan berbagai demo fitur CSS terbaru
  • Adam Argyle dan Bramus adalah Developer Relations Engineer dari Chrome yang bertugas menjembatani developer, engineering tim, dan CSS Working Group untuk memastikan fitur yang diluncurkan sesuai dengan kebutuhan nyata developer
  • Scroll Driven Animations adalah fitur favorit Adam karena memungkinkan animasi yang dihubungkan dengan scroll posisi untuk berjalan off-main thread, memberikan performa yang jauh lebih baik daripada menggunakan JavaScript library
  • View Transitions memberikan kemampuan untuk melakukan transisi antar halaman (cross-document) maupun dalam halaman yang sama (same-document) dengan mudah, memberikan pengalaman seperti Single Page Application tanpa JavaScript yang rumit
  • CSS Nesting kini telah tersedia di semua browser modern, memberikan kemampuan untuk menulis CSS yang lebih terorganisir dan mudah dibaca tanpa perlu menulis selector berulang-ulang
  • Field Sizing adalah fitur kecil yang memberikan dampak besar karena memungkinkan penghapusan ribuan baris kode JavaScript yang sebelumnya dibutuhkan untuk auto-growing text input
  • Platform web selalu berupaya mengejar keunggulan JavaScript library dengan membangun fitur-fitur tersebut secara natif, memberikan performa yang lebih baik dan pengalaman pengguna yang lebih konsisten di seluruh browser

Hai Hei Halo Halo semua selamat malam semua apa kabar gimana ini ini selamat subuh ya

jadi malam ini malam ya malam ini spesial episode kali ini spesial karena kita rekaman sama temen-temen

yang berada di timeline yang berbeda jadi kita cari apa irisannya dapatlah jam satu pagi ya satu pagi ya

jadi kita tengah malam atau pagi ini dini hari begadang ya karena tamunya spesial sekali dari luar gitu ya

jadi kalau temen-temen ingat beberapa episode yang lalu kita udah bahas tentang CSS rap ya kan tentang

bagaimana perkembangan CSS di 2024 sangat pesat dan ada apa namanya ada rangkuman dari tim Chrome

yang namanya CSS rap 2024 ya nah nih bentar eh nggak bisa dipos ya nggak bisa kalau nggak live nggak bisa di komen ya

jadi cari aja lah ya googling aja CSS rap 2024 itu ada websitenya dan websitenya keren banget makanya kita penasaran akhirnya

malam hari ini kita akan mengundang 2 orang dari sekian beberapa dari timnya Chrome

yang membuat CSS rap jadi kita tanya kayak behind the scene nya gimana proses pembuatannya mungkin fitur-fitur favorit dan lain-lain ya

jadi langsung aja kita undang dan undang welcome kita berbahasa Inggris

hello hello hello hello hey give you the plus dog Elisa

welcome to the show thank you for doing this thank you for coming to the our show

maybe before we start with the topic maybe you can start by introduce yourself or maybe Adam first please

sure I'm busy right now with Gemini having it made it make a rap because we're gonna be talking about CSS rap

oh my god I was like we're gonna rap we're gonna rap about rap and just get all meta in here

hey everybody my name is Adam Argyle I'm from Seattle in the States I work on Chrome as DevRel with Bramas

and him and I both focus on CSS and UI we're just obsessed with the web we like building we're like with you

we build all day every day and then we listen to you and we take all that back through Chrome we feed it into new features

we tell you about the new features and we rinse and we repeat and we love it so anyway that's me

well my website is nerdy.dev

nerdy.dev

nerdy.dev alright

is it coincidence your name is like alphabetically in order and Adam and then Bramas

and then

no one's name starts to complete

what about you

yeah so I'm Bramas I'm from Belgium and Adam perfect intro there

yeah we are chrome devrel working on CSS and web UI we work with the CSS working group to specify new features and for that we of course need all of your feedback

so yeah if you ever run into us or if you blog about something like give us a ping and then we can take that then we can take that to the working group to our engineering and hopefully we can come up with a nice new feature and when that feature lands you might have seen some blog posts from us pass by or some demos where we demonstrate and then hope to get everybody

Lihat transkrip lengkap (540 segmen lagi)

kickstarted with with the actually building stuff with it so yeah oh I also have a website just like Adam Adam is nerdy.dev and I am Bram.us but I'm not from us I'm from Belgium

okay

okay

that's a perfect TLD for your name

yeah

yeah

yeah this dates back from from the days where everybody had like

yep

main hacks where it was like if you had something clever with your domain and you could use the suffix or TLD as part of it and it turned out it worked for me

it's also is brand nice brand dot us exactly perfect nice does Amsterdam have a TLD could I be add.am you know

or would Amsterdam be three experts you know would it be anyway it's very cool okay okay yeah we're bigger sorry

no worries no worries okay so um yeah you uh you are both um uh devrail right can you tell us about how uh what did you do uh

every day looks like what is a devrail because some of our audience probably doesn't know much about what is devrail

go first promise let's see Adam is pointing at me

yes please

yes so um as daryl we um try to on the one hand like spread the word on new features on new web features

so whenever something lands in uh chrome in this case then we like try and make sure that we have a blog post that announces the feature

um give you some demos write an article maybe update mdn to make sure that the info there is up to date

um that's like one part of the job but then the other part of the job is also listening to your feedback

and then making sure that that feedback so that feedback that real web developers have that feedback

then makes it back to engineering or the css working group for example um so that way that we can make sure

that instead of shipping the thing in a browser that we are shipping the right thing the thing that actually

solves your problem um so so like this we were like this this bridge builder between standards bodies engineering

and and web developers um and to do that as part of our day-to-day job we often get to play with features

first like as it getting prototyped in chrome we we get our hands dirty we try and break it um we try and point out the flaws

and to make sure that we can ship you like this nice polished feature in the end that then it's part of the

web standard of course and then hopefully soon sooner or later it will be in all browsers so that you can use it

yeah sounds very complicated to me because you have a lot of stakeholders like engineering and then the the audience

us you take a lot of feedback and you take from the other and um a lot of people to please

yeah and sometimes it's a bit difficult right but sometimes we we see like okay this is like a real pain point for developers

we need to get it prioritized but then engineering is like yeah but we have all these other things that we're already working on

like we can't just squeeze it in there somewhere

yeah so we have to try and find this balance um where where we can like try and influence the priorities

and sometimes with success but sometimes we just have to wait as well and we are just waiting on the buck until

the email comes that somebody got assigned to it and they were like yes somebody's working on it great

and it's when it's yes it's only for one browser you still need a yes for another two browsers

oh yeah that's awesome that's why i said it's complicated

or if something lands in another like we'll definitely be talking about view transitions today

if that landed and when that landed in safari like i tried out all my demos in safari to make sure that

the thing that we have is interoperable with the thing that safari has and sometimes it surfaces a bug in chrome

but it will also be a bug in safari and then like we file the bug make sure it's followed up

make sure it's followed up and and write the test for web platform

maybe adam can add some more details to everything

i mean a little bit but yeah y'all can ask some questions i have a quote i'm gonna find

because i just the other day was like oh this is a really good thing we do with dev rel

it was like quippy in short i'm gonna find it while you uh ask brands more questions

i think i heard web platform tests i'm not sure while i was talking or

wpt i heard that too yeah wpt yeah yeah when you were talking about the bugs like uh you know in browser

a it has uh this web but in browser b it has uh uh that but and uh you are also in charge of uh uh

uh well we we we don't typically um do that like it's more for engineering like like if if chrome

and something then they'll also make some wpt's they make sure it's upstreamed and all the other

browsers also get those wpt's and then their implementation and they start doing it like hopefully

they also get all greens um so we don't necessarily are involved in like creating a wpt's um we are more

involved with the practical implementation because the wpt's are great like they test some basic things

but one if if the test is is flawed like it tests the wrong thing or something is not tested then you

can still have all greens right like like if you if you implement a feature and only have one test that

says can you parse the property you will have a score of 100 on all those tests but it doesn't mean

that the feature is actually usable so that's where our practical approach comes in like we actually build

build something and then we find out most often i go okay we have this one feature and we try and combine

it with another feature and then suddenly things get a bit weird and yeah that's the practical approach

um say we're very very hands-on with it with everything okay

i see adam you did an awesome job no that was really really great uh covered so many things it's like uh like

like the last part there's like sometimes we do weird stuff you know so it's like hey we've got this

feature it scrolls like this and you're like oh yeah what happens when i scroll drive it and make it

rotate and they're like i don't know and you're like well that's why we're here we're here to do weird

stuff um yeah the the quote that i was looking at those like i was looking at like i was trying to think

about what's our value like it's easy to tell you what we do you know hey we listen to people and we

make sure that those features get put into browsers in a good healthy way and then we

go build with them to make sure that actually solve the problem so it's like we can tell you what we do

but the value i was saying uh at a high level like something i would tell my mom uh would be like

things should be conceptually easy like it should be easy to uh have an animation between two pages

okay conceptually that's easy but in practice is it easy no no it was quite difficult until we listened

enough we tried enough we found a way forward to solve this problem in a really elegant way so what

what i'm pitching is is that devrel makes the conceptually easy concept a reality and we do that by

listening to people trying out these things early on saying where they're wrong and um and yeah i thought

that was kind of cool so we make we make the easy concept actually easy for you uh because otherwise

it's just too easy to say things are easy just like how many times i've said easy right now

easy peasy um easy peasy um but i can i can relate to that easy things a reality that's that's nice and

catchy yeah thank you i thought so i can relate to that story for both of uh you uh your adam and

brothers as well like um when we start this podcast it's actually started when when we were in bali uh

we have uh this gde and gdg summit in bali and so it's asia um so me and i mean eka at the time just

talking two years ago we just talking about container query is now landed uh as us uh to firefox and to

chrome at the time 22 years ago i remember that so we talked about it uh during this uh when we

face uh meet to face to face hey yay content query is now landed and stable we can use it yay like um

and then we realized we don't have a platform to talk about this kind of thing that's why this

that's why this podcast is like born but come back to yours uh to your point is like we read somewhere

like from the web.dev and from the any twitter or your blog post that now this container query has

landed with all the example and then now we can implement it on our um day-to-day life

which is perfect and i still remember that i uh one of the talks that i gave like still related to

web performance but when i say like you don't have to use a for that scroll you don't have to use like

uh like sorry for responsiveness and you can use container query rather than use your fancy javascript to

to control your boxes and do hacky stuff and now you can have your container query save a lot of time save

performance so thank you that's i can relate so conceptually easy and now it can it could the

implementation could be so many things and from my perspective anything that is uh a new technology

uh new api uh release i i relate that how can i save or make the site more performance that's always

uh my basic stuff uh to go when i see this css web um how can i make the site lighter that's it

awesome so yeah you're looking for performance advantages in all the new features like ah

what can this do to make it easier on the browser and when it's doing a loop how can i make this

easier on a browser when it first lays out the page and yeah there's a lot of yeah a lot of thinking

we do about the machine uh to make the machine happy um and we do a little less of that bramus does a

good amount of machine um making it happy but i like to let the engineers do that and then i'll just

like do something weird and if it didn't work out very well i'm like that's not my problem i'm uh

just trying to make something work here but yeah i could try to make people happy trying to be pms

happy happy happy that's a challenge like better than making the machines happy and making the all

different groups of people happy and uh you know i think the tricky part with css and ui like uh you

mentioned about conceptually easy things like what's conceptually easy for humans is uh really different

from what's conceptual what's easy for machine like uh for humans humans uh like on on the surface level

we tend to think visually so if we want to make things uh go here to here we just slide it that's easy

and sometimes it carries over to a web or digital ui as well and there's a perfect example about this i think

like uh when i first learned css uh like animating uh height height to auto i think easy peasy yeah

you can animate easily from uh whatever two two rams to 10 rams it animates perfectly and then so uh you

can animate from two rams to whatever the the the block block height is but it turns out not that easy

and it just recently shipped now in 2024 i think yeah that's an image to hike auto yeah yeah so that's uh

i think that's a perfect example of um conceptually easy thing that is actually not easy

yeah another example for it is a the parent selector that you always wanted like oh yeah

the parent element i want to select the element that has the other thing contained inside of it

we've been struggling on that one for for 20 years before browser engineers figured another way like okay

this is how we can people keep requesting that but uh the the browser programmers uh say well it doesn't

work like that that their program runs from top to bottom all right you can't but the cool thing is

that um the original request was i want a parent selector and the thing that we eventually got the has

selector is way more than that um because you can select siblings you can you can go up down in all

directions in the dot tree um so that's that's also cool where we often hear like a request

and then then we think about it together with our team of engineers to get over the css working room

and then the solution that we come up with like solves your problem but also solves way more than

the original problem um another another example for it is for example um uh variables we all we all

wanted variables in css yeah but the answer to variables in css are not variables no they are custom

properties custom properties the way that we have variables in css is by having custom properties

and the cool thing is because they are properties they inherit you can change them as they inherit

onto siblings and combine it with all the selectors that we have you could say well if this thing has

five children then the dash dash gap is going to be two rams instead of one ram or whatever and it's

yeah it's it's so cool the the simple problem but then we have the solution which took a lot of time

but the solution like opens the gates to all kinds of craziness that you can do with it

yeah now css have functions right yeah it's something that's currently being prototyped

and container queries gave away to scroll state queries and gave away to style queries and yeah so

people just wanted to query the container they're like how hard could it be i want to quit and then we're

like let's give you that plus a whole bunch of other good and like miriam suzanne likes to say containers

they know stuff and now we can ask them what they know yeah okay okay now maybe let's talk about css rap

maybe uh adam you you want to do a rap about css rap i mean what is it said yo the web's evolving ain't

no time to snooze css rap 2024 drop on major news components stacked high precision in the game feel

size and flex and putting pixels to the shame hide out of flow and no more rigid lines exclusive layers

building intricate designs style highlights making text pop and clean anchor position in living the

developer's dream

oh we're talking about like performance things there's some like really cool performance things

we had to overcome in this page there's even some that we couldn't fix uh and then one of the things

uh that i think is uh was really highly desirable by people is a scroll spy so that's like as you scroll

down the page and the the dinosaurs following along on the uh yeah yeah the map on the right and it

auto expands the the details we see animations that are very still stateful yeah normally this would

have taken us a whole bunch of javascript and that one's all css really i didn't realize that it's

i know that i know the dino but i don't know that it is it is it is just css i think there was one change we had to

do so that because we wanted to trigger the open and close of the summary details and we had to use

javascript to do that why it's not yeah yeah why is your chrome dino not moving i don't know what

what browser is this what process is this uh uh maybe prefer prefer reduce motion enabled maybe no that

would have stopped some of the other ones i don't know he's skateboarding in my copy updating right now

oh and you're you're even in canary and it's like having issues yeah i'm in canary hi what regressed

that's a new bug we found a new bug hey he's skateboarding in mine

it's also skateboarding in mine you can share your your uh can you share your let me let me check what

the chrome is doing oh yeah it's skateboarding in mine so it's cannot it's not working uh it's working

in canary for me so here we're browsers fun right yes it's rotated and then translated it looks like the

scroll driven animations just not kicking in on it at all yeah what happened maybe i don't know do you

have like battery safe safe or uh like power mode safe oh yeah something that's like reducing

maybe this is your battery you know stuff that you talked about earlier adam please please someone

share your screen i can i can i want to see i want to see but the cool thing about the the dino

breaking is that like it was a little extra effect that we added using scroll driven animations but it

wasn't supposed to be skateboarding across the uh viewport as well not just in the table of content uh go to

scroll to top scroll the top this way yeah there's another guy over there yeah oh yeah particles at the

very top yeah from left to right very top yeah yeah let me share screen oh i think you have reduced

okay yeah that's right which is pretty cool right because it's a feature people that say that hey

we're not fine with all these things flying around yeah in css we can respond to that it's it's a media

query okay gotta build for the people too gotta what do what do the people need what's the machine need

what do i need it doesn't matter okay let's talk about the the css wrap itself uh

what what's your motivation uh to do this every year what's the goal well we uh a lot of times

different people have different moments at which they can go research and ramp up on all the latest

stuff so a lot of people aren't watching all the features as they come out you know so we we might

announce it um and we know our job isn't done as devrel if we just say hey there's new features in chrome

135 uh go check it out we know that our job is totally not done we need to go give talks

uh we need to follow up with developers as they use it find bugs and then continue we call it like

ringing the gong or continue to share something with people because you never know what moment

during the year someone's going to have time to go look this stuff up so css wrapped is we're assuming

people are on vacation they're kind of chilling at home maybe they would like a digest something that

summarizes the year's css growth into one place to go experience it and so we roll that up into this

yearly thing um which is good because all the demos all the learnings we can kind of repackage it up

and it's fun and cute last year's was like a book uh this year's uh was much more like an article oh

wait no two years ago was a book last year was a blog post and this year was like a interactive long

scroll uh scrolly telling yeah we did scrolly telling this year yeah yeah yeah yeah this is 2023

and this is like 2024 so this is this is what you miss it's skateboarding and then there's another one

here another one here yeah yeah yeah yeah it's skateboarding so oh yeah this year's theme is like

80s uh pixel game retro game right kind of it was supposed to be uh like each section

was like a different biome like you can see one's like arctic another one is like a desert

um and we had a designer we were working with and um yeah it's like as we as we evolved as we

continued building so like i built a prototype and then the designer designed and then they did stuff

and i did stuff and bramis did stuff and as we just kept going it just kept we let it be very organic

uh the concept of it ending up being so retro and 8-bit is kind of an accident um that's also

because i like retro stuff so it was easy to be like ah let's make it dirty um so yeah that was the

motivation there yeah and there was a bunch of stuff we didn't put on there because we didn't want

to put on this yeah yeah do you use intersection observer for this like to detect this section and

so the the section there on the left can announce its view timeline it can name it and be like i'm

the scroll driven animations view timeline uh and that really just takes its whole div and kind of

its intersection with the scroll port becomes a timeline uh that other things can say i want my

animations to be powered by that scroll driven animation timeline over there and that makes

the little snake grow for that item because it's observing the scroll position of the other document

content as it goes through the page including this active line like this yeah that active line is also

dss yep the only javascript in that is to open the uh accordion in the right moment so if you scroll up

up past scroll uh it'll automatically open the one that you're inside of and that's that's the only js

oh industry yeah that's a really popular component is a scroll spy uh they're also going to be made

easier with carousel uh so we have css carousel coming out in chrome 135 and we'll be able to

link up a a little side element with the actual content uh really easily uh through there as well

so i'll have multiple options for these really cool interactive connected experiences

so why dino is it dino right is it the dino and why for um you chose the story of forest mountain and the

see this time because this is so different concept from last year 2023 2023 yeah this is all about

color and typography if i remember like yeah as you can see last year we had uh this group

architectural foundations typography color and so on and so on and then this year we also tried to to

group them and then we we quickly landed on this idea where we have like different worlds to explore

different scenes to explore um and like we we did a big detour because then suddenly we were inspired by

um a racing game i think we wanted like to have this 80s retro yeah rad racer yeah yeah or like you

you know the classic mario uh

stage one is uh on on on land the original mario bros yeah yeah and then the third i see like there are

different worlds yeah and so eventually we i think we quickly settled on the pixel style art like to

create different types of worlds we want to like to have to have a car race i think but that turned

out to be too difficult right because when you're brainstorming you're like all out oh we wanted this

we wanted that we wanted that one and then we we toned it down again and and of course we had to

drag in the chrome dino because it is pixelated right so yeah we could not not have it so

is there any easter egg here that we don't know

did you plan any easter egg uh well if you

we didn't plan one but i think the most fun one is you can make

um the dinosaur kind of dance if you just scroll up and down back and forth

he'll sit there and dance you know it's like oh so you can make him shake his butt uh you can

also do yeah i don't know if that's the easter egg uh there's plenty of like oh there's another

easter egg when you go to the mobile view the menu icon is a hamburger that's kind of like a

you know it's like oh it's a hamburger menu yeah oh yeah yeah we we noticed that

in our past episode which i saw leah verus site yesterday has a hamburger on it i was like oh

i wonder if leo was inspired by our hamburger to turn hers into a hamburger

well now about what time some restaurant make a hamburger that

actually looks like hamburger menu menu

let's see if i can find our prototype too oh yeah here we go here's the 2024

wrapped prototype so i was prototyping in a code pen while the designer was going

yeah like bramis was saying one of the original ideas was like you're going on a road trip and so

your first part of your trip might be through the desert area and you've got these stops to make

and so you would stop along the way at these sites to see in the desert area and then you would move

on to the next area um so we were trying to create this feeling of traveling across all of

these territories or all these biomes and you'll see in this one uh oh here look you still don't have

scrolls uh you probably have yeah prefers reduced animation on there's a bunch of scroll driven

animations you're not seeing there oh okay let me

um so yeah you'll see a different variant of the of the dinosaur going to where it's much longer

like he goes across the whole page as opposed to right now it kind of goes through sections and

stops anyway it's funny oh but he might not do proper type oh see yeah and then there's the car

it's supposed to be moving this is the car yeah yeah so he should be twisted and driving along the

thing but it looks like uh i see yeah i don't know where to change that settings

anyway how you you um decide what what css feature do you want to uh do in css wrap or every every every

every new css feature you uh categorize in that uh like uh like this like for uh component and and

and for uh interaction developer experience yeah we we had to limit ourselves right because if we

wanted we could have like doubled the amount of content which would also would have meant that we

had we had extra work to do and time is always tight right so yeah um so i um i think if in the

end we went to uh to having the cutoff point like okay we shipped this in chrome this year that was a

cutoff point and we made some exceptions for some features that um were uh baseline uh this year they

were like okay these features now available in all browsers and it's i think it's definitely worth

mentioning so we're gonna include it um i think the the one exception on that is um scroll driven

animations that we covered on the website because we had it in chrome in 2023 but we did feature in 2024 on

our css wrapped but that's because uh i published a video course uh with 10 episodes where you can like

learn all about scroller animations and we thought it was worth like uh put some extra attention to

that by including it on css wrapped but yeah we we did have to make a like a cut somewhere um because

there's so much cool stuff there's so much going on in csland yeah it's like a theme right uh last year

uh in 2023 uh css wrap in 2023 there is um like color uh typography and now uh

it's yeah it's it's it's more than more i feel like an impression component but the the highlight

is scroll different animation for me i like the scroll different animation that's the most i know it's like

view transitions are pretty cool too don't go all in on it for you transition yeah

yeah there's a lot of interactions thing related to scrolling and so it's it's really cool what you can

you can do and like a common type of feedback that we get from people like especially when talking about

scroller animations it's like yeah but i have this javascript library that i can use like why should i even

bother with css or the new feature in javascript it's like well yeah now you have a built-in thing

in the browser and it's but it's like it's true power is gained by the fact that scroll driven animations

are powered by regular css animations or the web animations api and that technology already knows when to

hardware accelerate a certain property like if you do an opacity animation a translate a scale whatever

that all runs on the compositor so it's crawl driven animations being built into the web platform you can

have harder accelerated animations driven by scroll that run off the main thread and it's like so cool

because then your main thread can do all other stuff because your main track can only do one thing at

the time right so yeah it's really exciting uh that one you have like this visual thing that you were

already able to build but now you can have it in a very performant way um yeah that's why um with this

like bunch of week like in the future like upcoming after this is uh become a baseline so the store

different i mean it's like baseline perhaps next year that means i can ask uh my team let's get it out

all this javascript that you don't need to just make this animation anymore get it out why wait till

baseline i mean if it's uh i guess it just depends like some teams are like the the scroll animation is

required and you're like what about users with prefers reduced motion are you going to make them get

scroll no no we won't force scrolling them okay what about users with javascript disabled how are

you going to give them scroll animation oh they don't get scroll animation either so then how come

it's so weird for me to say that like scroll animation is nice to have you just told me two

different groups of people that you think it's okay not to have why not a normal person and then we can

get rid of the whole huge library and over time it won't be an issue and users without javascript

enabled start to get scroll animations so that's huge um anyway

and i think there's a polyfill right for scroll driven animation so i'll just dynamically look

the polyfill if if if it's really really necessary there is a polyfill but it comes up with a few

asterisks like um it doesn't support all of the syntax and you need to you need to put your css in a

specific location because only then the polyfill can like find your code um but the biggest asterisk

quid is is that that yes you are um not having the benefits of the the composite animations in that

case because all the javascript that is required to pull fill it runs on the main thread so back to

your main thread animations and that is a trade-off that you have to make as a team right like are we okay

with not shipping the animations at all to browsers with no support or or users that that would want

it um or are we okay with actually then loading up the polyfill in those older browsers um which

general result in a perf hit so it's it's like yeah it's straight of it yeah yeah sure like everything

i can i can i can assume that some people really want the animations to work on all on all browsers

yeah you you can opt into having the polyfill and but do note that it comes with a with a cost

well if if you uh if you use external javascript library it's it's gonna run on the main thread anyway

yeah exactly that's also one of the things that you need like there's always like yes but and then

there's another yes button respond to another yes but it's like the golden answer it depends

that's the only honest answer on the web it depends yeah it depends okay okay

is there any uh like um success story or uh impact from uh css rep uh website that you receive maybe like

testimonial or something i mean there's a lot of appreciation i think a lot of people didn't know

certain things could happen and uh it's it's nice this is why listicles you know like the popular like

five things that are new this month in css whatever number three is gonna blow your mind number five is

really ugly and gross you should don't smell number five you know um and everyone's like what i have to

smell this now and you're like i just told you not to smell it you weirdo okay um but people like

these because uh it can be hard to hear about these one by one but if you get to see them in a digest and

see them all summarized demos with with the browser support right there on there um that can be really

nice for people especially as we kick out to deeper learning um so i think we got compliments that way

the side nav um you know being a scroll observer a scroll spy and being mostly css driven has been very

inspiring for a lot of people because that's a very common component to put on a blog for example

right you're like i wrote a blog post and now i have a table of contents and i'd like that to be

linked up with the content you're like oh here comes a javascript library uh not necessarily

there's some features which really surprised people too like they had no idea like field sizing like

one of the first ones on there oh yeah um people are like i have a whole javascript library that does

this so that when i type into text inputs it grows and i'm like cool get rid of it now here's a one

line of css that does it now yeah we didn't know about it actually so we had an episode about css wrapped

and we try it we tried live on air like we were like we we just typed and uh hit line break multiple

times you know what i really like during the early material design i think but we used to

have to use uh you know javascript what i really like about this feature is that like it's not one

of those big fancy features where it's like view transitions scroll driven animations but it's like

this one little thing that got added to the web platform but it has a huge impact because you can throw

away thousands of lines of code that did it or 500 lines of code or whatever like embrace the platform

use the declaration boom you have it then same response i always get also with uh smooth scrolling

where you set the scroll behavior smooth and then you click a link in the page and it scrolls down

and if you if you mention that at a mainly javascript focused audience they all go like

what what what just happened one line of code one line of code okay very nice have you remember that

the days like in 2000 perhaps 2015 2014 where the web is like love to use sliders like they call it

slider revolution where these animations that that that make the sliders so fancy and

text flying in there that's very very heavy no no no this is what we call like in wordpress what

is called a plugin called slider revolution where the slider can just like like 3d animation it's

got webgl all sorts of textures and layers animating yeah yeah and it's so heavy but people love it at the

it's got the time and now nowadays like in fact no yes something like products effects also after uh

that time um but yeah those um those are very very very heavy javascript and just to load that

uh if i see a website that still use it is just load the site like only for the javascript to load that

that requires at least 1.5 1.6 megabyte the javascript file only not to mention the the image itself so

um yeah like i'm right now like preaching to get rid of all those javascript just move to what the

platform gave you and yeah css just share the link in our chat here maybe you can present it on screen

but like the parallax effect that you mentioned this is possible with scroll driven animations

where you say like okay if this thing is entering this one you have to scroll horizontally but if you

look like the images move a bit inside so yeah if you scroll it slowly yeah the images oh yeah

and if you hit a little css yeah it's just a little eye icon there at the bottom right

you can see the code that was used for it

and it says the images yeah blah blah blah and it's like that that's an animation that's all you need

for a parallax effect oh wow it's cool right very cool

wow that's one of the things that i really love about the web is that um if you if you look at it

like for for over a longer period the web platform always catches up we always had these things that

were first built in user land like we used to have flash to play video or to do animations on the web

now we have video element we have streaming video and we have css animations we have weapon amazing

we have transitions like all the stuff catches up um the oh i'm drawing blank here adam help me out

what are some other examples oh are things catching up i mean stuff from jquery that wasn't going to

say like like all the whole selector engine uh that jquery of like first landed well we have that now

in in javascript document of queries for all features yeah they're in the native language yeah

functions mix-ins uh variables like yeah the platform always catches up and admittedly sometimes

it takes a bit of time because we have to think hard about it um but in the end

yeah that's six years or something like that um yeah right now it's like pop over like the model

pop over and also um more web component uh landed as well like um but it's it's still getting

improved like we we have pop over now but now we have dialogue anchor positioning yeah anchor positioning

and then now we have pop over hints that landed recently we're gonna have like a tooltipping behavior

where one pop over doesn't close the other one and then we're gonna have interest invokers something

that's coming in the future where we can trigger the pop over by just hovering the link or the button

it's like it's coming to a full circle there it's like cool you have all these little things and then

together they form like this really exciting thing

and native css nested you need to mention it native css is huge

yeah we have really enjoyed that one for that on lock like he was one of the driving forces behind

that one i was i was like uh i just kept poking thank you thank you for that that's really really huge

huge improvement i think so too and we're still making it better so bramas has made posts you know

just in the past few months i think one of them is in uh css wrapped actually one of them is

developing experience css on nested declaration yeah that's the one there yeah and we have more

improvements coming too where you can put an at starting style inside of a pseudo uh element so you

can have like dash dash before or colon colon before and you could do it at starting style inside of

of there uh we're making more manually adding and removing class name css class name because uh we

already have starting style right yeah that one's really helpful for a use case like that yep so yeah

we're still making it better and there's even more improvements coming i was just talking with uh

folks yesterday who were like i ran into a bug with nesting and we're like yes that is uh it won't be a

bug eventually so we're kind of as we as we find more and more it's more like uh we started simple

and now we're teaching nesting how to get more complex and handle all of the edge cases and

it's cool it's fun work okay cool

so much stuff uh

what is your favorite from

2024 the your most favorite just one and just one just like which one is your maybe we should guess i

i think adam is going for the scroll snap events

i would like to say that one because of how involved i was with it and how many use cases i

have for it but if i'm being honest about the one that i use the most that just continues to creep

into all my little prototypes it's scroll driven animations and i would have thought it was view

transitions uh which i still i love those a ton but i genuinely think scroll driven animations is

freakishly capable and unlocks so many use cases like we don't even know about like we've already seen

new hacks that come out where you can watch the thumbnail go across an input type range and use

that with a scroll driven animation to power something else um there's just we are still barely scratching

the surface what scroll driven animations can do um yeah it's it's the gift that keeps on giving like

kizu has some very nice hacks with it where he where he managed to create um text that automatically

sizes to the available width of the containers if you shrink the container the text automatically like

shrinks its font size and it's powered by scroll driven animations like

what oh okay yeah it's it's a very clever hack like every time i look at him like

what how does it work and then like okay so clever yep

so bramus what's yours mine's scroll driven animation well if you pick that one then i'm gonna pick the

other one with just view transitions yeah i think view transitions is um a really exciting one because

people have always wanted to do more things and the way you used to do it before is that you you cloned

the element and then you animated it that's but like accessibility wise and you had like two copies of

the thing in your dom which is like uh weird and like it relied on all sorts of hacks and now we have

it built in um and it's like already this point where it's like okay cool i can do some things with it

but i think the the real power that we're going to see with it is going to come this year um where we

are going to to experiment well our engineering team is experimenting with it right now and we're going

to unlock um scoped transitions where instead of doing document of start review transition to to like

start the view transition for the whole document you can select a certain element and then say

element dot start view transition and the view traditional only run on that specific little dom

sub tree which is pretty cool because then you can ship it like like something like a chat

component widget whatever with view transitions without interfering with all the rest of of the page

or like client-side router so it's going to behave just like client-side router you know you you have

the shell intact and just uh replace the content or whatever yeah um speaking of by the way um clients at

router um people always want to use react and the react team they have an active br

in the works where they are experimenting with view transitions and we are supporting them

in their effort which is also pretty cool uh and then also the thing that that lennon and chrome last

year and is also available in safari as of 17.2 if i'm not mistaken are across document navigations

where you can have a view transition between two pages by simply clicking a link or submitting a form from

the one page to the other and it uses the same building blocks and the same type of logic

as the same document view transitions the only difference is the trigger in the same document

version you call document.start view transition but in the cross document version you just click the link

it's like oh that has been really great for the for the past 30 years so it's like embrace the platform

cross the cross document yeah yeah we have this it's just like and now uh firefox is left out at the

moment they just the regular page navigations yep uh but newer browsers will animate yeah at worst you get

the status quo experience which is you click the link and then the new page loads and it swaps out

and if your bravo speaks view transitions well then you get like the nice moving thing and of course you

can then wrap it again and add first reduced motion media queries to respect that and all sorts of stuff

so it's it's it's really cool um that this is powered by css on order hood yeah you can go to my

website nerdy.dev i've got scroll driven animations view transitions dialogue elements

i mix and match a whole bunch of this stuff in there and so you can visit my site from firefox

and see what happens but if you click that card you'll get a view transition there that'll make

the card morph into the next page using uh crosstalk review transitions so no javascript involved there

and then if you keep scrolling down you'll see i'm using scroll driven animations to bring in people's

comments if you go down to the very bottom there's even so anyway uh i think about a lot of these

things like what's my site my site has posts and like some content on it um but i can enhance that

from just a basic document with all these different things i can do and i like thinking about it in

those layers i like thinking about uh helping people in those layers too i'm like here's the base

experience um if people are cool with animations i add the animation so i always do it very additive

some people are like i remove animations if you don't like animations and i'm like no i don't do that

i add them only if you're cool with them uh and it's fun it's fun to have my own site to do so but

yeah those animations there's you navigate between stuff is all css no javascript wow very nice

i cannot make yeah you keep mentioning baseline and i'm like baseline is cool like if that's how

your team is working and you all are agreeing that way but it's also not difficult and very acceptable

to upgrade it for the browser that can do it you know so just like use my site as an example if you

want to where you can even browse it with javascript disabled and you still get the animations and stuff

right so it's like not only are you uh minimally giving these experiences and conditionally applying

them you're actually bringing in more people to the experience too by removing the javascript and

just kind of so many things to think about right yeah i think one of the points where people um

possibly misinterpret baseline is when a feature is not baseline that does not mean that you can't use

it when the feature is not baseline it means you should look at the feature itself and then make an

educated guess on whether you want to use it or not and things like text wrap balance and whatever it's

it's not baseline or maybe it is baseline newly available but you can use it at worst case the

declaration won't be parsed and it won't have a visual effect but at best case if the browser supports

it great they'll get the nicer version um so yeah if something is not baseline you you have options you can

polyfill it you can treat it as a progressive enhancement and say like maybe after all we're

not going to use it because it's a lot of work to implement and that's fine as well then but yeah

if something is not baseline you can use it but you'll have to assess that yourself uh together with your

team yeah yeah nice okay well i want to know which is your favorite from css wrapped each of you

uh you have to call me your favorite one

ifan what's your favorite well i did say like uh in in this uh in this css wrap uh 2024

that gets my eyes scroll different animations um that's that's one thing um from 2023 i learned it's i

i haven't used that much but i learned so much about the color level four the color that what uh like

oh k lch okay lab as i i don't even know what it is before and i just thought you can't do it right

now with that kind of thing yeah um it's confusing uh about this color mix um haven't used it to be honest but

but i know that it is there right now um and learned so much about this color mix but yeah

and also from from 3023 like those new color spaces display p3 color that's like wow so cool

like i always thought that hot hot pink was a hot pink turns out there's a hotter hot pink out there

yeah those wider gamut it's like cool yeah yeah uh for me and maybe maybe ekka uh absolutely it's uh

uh view transition because uh yeah uh i know i can do like server render or uh traditional request response

website to uh to behave or to experience like single place application right so yeah that's that's a win

win-win solution for me are you using them on any of your projects right now

um not yet but uh but uh i uh i try to use that in in uh for for the demo uh uh for the demo for

speak or talk uh in in some uh event yeah gotcha cool

so that's a that's another one i feel like view transitions is another one that's pretty easy to

progressively enhance because you're like all right i'm gonna take the thing you clicked and i'm gonna

put it over there with javascript uh and you're like cool i i put it over there with javascript and

i'm done well you're like actually if all i do is wrap this and say if the browser can do a view transition

then do it if not so i'm still putting the element over there no matter what just one of them gets

wrapped in a function and one of them doesn't and so if the browser has it they see motion if there

isn't it's just the same as it always was just like uh bramos was talking about with like page

navigation the status quo is still there we still swapped the elements it's just in one scenario it

had uh motion and the other one it didn't so it's kind of fun to again yeah progressively enhance if

that's something you and your team are are equipped and ready to do yeah uh i have planned to to implement

that in our um video podcast uh website so uh it's still a server render and when uh people click

user click uh the the episodes uh they go to another page and it should uh animate

yeah yeah it should transition and for first for slide because i love animation in my slide so now i can

do it with uh like uh tools like uh slide.dev or yeah or or any kind of website that have um transition

animation yeah yeah or use morfol here i'm sharing this this is a uh astro site that you can build it's for

making slides and you don't have to name anything it's got names for things already and if you just

go build your slides and then you click between your slides it will morph your code snippets it'll

morph your titles um i think you can try it out there it's smashing transitions.netlify.app

is that one still going oh yeah wait was that still running yes are they no are they view transitions

no i don't think so something old in there

this is motion oh there you go oh there you go oh there you go okay between the rocket and clapping and

the table yeah exactly sorry if i click there is no transition but if i um push the arrow button yeah

keyboard it's transition why why is that one book book another one might be like cash or something yeah

maybe cash yeah maybe cash oh

because i think i have pre-render in there with like speculation rules and a bunch of other stuff so i'm

curious what's failing maybe i need to add that uh that check that looks for an element at the top

yeah because look i'm pre-fetching the next page

i don't have the meta tag anymore so i've definitely upgraded it since then

do i have the app rule oh the app rules not at the top maybe is that the deal

sorry at view transition the the at full gets hosted that returns navigation although that one gets

gets hosted to the top okay oh because it's currently almost at the bottom of my style sheet i wonder if

if that's why oh so it's space of this seems to be some kind of race condition i just tried it

myself and even when i click the arrow sometimes it animates sometimes sometimes it doesn't yeah

let's try more re-render settings

here try this version for new books to think about

let's see is that one animating better that one's animating a little bit better it's still

still needs it's like you have to wait if you wait on the page before you hit the next page

it behaves better it's almost like i give it some time to pre-render

and when i'm talking on stage it's a little better right because uh uh-huh i i have the

time it's gonna take a while yeah there you go you saw those morphs so yeah each of these slides is

its own web page you build them in astro as individual slides and then it does all the work

with view transitions to make the animations morph so that's free and open source if you all want to

use it yeah and the cool thing is that that you built their atom is that like it automatically

works so so it figures out what is the title on the previous slide and then we're gonna morph that

one to the title on the next slide and then if there's a code block i'm gonna move the one code

block to the other one it's like yes and it i think you've done it with with the with some css

is it scroll snap events uh between like between one uh code block and the other that one's scroll

state queries yeah so that's how it knows which one is snapped yep and that's also progressive

enhancement so if you're on a browser that doesn't have those it just doesn't do the little focus

thing okay oh but yeah bremus is mentioning i used the nth of syntax to get that one done

so that i could select the unique uh h1 and then uh if there's multiple code snippets i make sure i

grab uh just two or three of them and yeah the end of syntax was clutch for that okay yeah view

transitions very cool but yeah that one's all css view transitions no javascript on that either

yeah yeah it's very cool how you navigate this uh like horizontal uh scrolling when you present

cross snap cross snap events oh when presenting no i mean like presenting next between slides put one

pages between the the yeah quote snippet like this so you're asking how do i navigate between them

while i'm presenting yeah yeah just yeah we'll stand on stage oh i'll stand in front of the computer yeah

i'm usually in front because uh those those little red dots that are on there too those are all demos

so if you hover over red dot i use i would open those in a tab i see and then i would go through the

demo on stage and yeah open up those or something yeah this is the slide and the demo both of them yeah

yeah very cool very cool maybe i can steal this yeah i want you to that's why i'm like hey steal it this

is really it's i find it to be a very quick way to make really nice looking slides um but it does seem

like i'll have to backport some of my enhancements from my talk in france a few months ago i made a few

changes and they could be upstreamed into the open source hmm yeah i'm curious why you guys uh you choose

uh astro for the css rep website any particular reason we uh that page would have been really

really long html file to edit if it was just one file it's a

Deskripsi asli dari YouTube

Pengenalan Pembicara: Adam Argyle: Dari Seattle, AS, bekerja di Chrome sebagai DevRel, fokus pada CSS dan UI. Bramus: Dari Belgia, juga bekerja di Chrome sebagai DevRel, fokus pada CSS dan UI. Peran DevRel: DevRel bertanggung jawab untuk menyebarkan berita tentang fitur-fitur baru, mendengarkan umpan balik dari pengembang, dan membantu memperbaiki fitur-fitur tersebut. Mereka bekerja dengan CSS Working Group untuk menentukan fitur baru dan memastikan bahwa fitur tersebut memenuhi kebutuhan peng Kunjungi https://ngobrol.in untuk catatan, tautan dan informasi topik lainnya.

Episode Terkait

Bagikan:

Suka episode ini?

Episode baru setiap Selasa malam. Dengarkan lewat YouTube, Spotify, atau feed podcast favoritmu.

Pilih Cara Langganan

Memuat komentar dari GitHub Discussions...

Jika komentar tidak muncul karena ekstensi privasi / adblocker, kamu bisa berdiskusi langsung di GitHub Discussions .