6 ms·
CSS Triggers
- rubber_duck 9y agoLooks like a nice reference for optimizing layout - haven't done much of that but I'll save this if I ever need to. One note - the color scheme/presentation on the bars is kind of confusing (what do white bars mean vs. faded out bars ? I'm assuming one is no results and the other is not triggered ?)
- maaaats 9y agoWondering the same. Is gecko just very good or is it no data? A few sentences on top explaining what one is looking at and what it means would be a good idea.
- blue1 9y agoAn explanation of what this is would be good.
- robin_reala 9y agoUsing certain CSS properties will trigger various phases of rendering in browsers. For performance reasons you want to do the minimum amount of work possible. An example: adjusting the width of an object will understandably cause the browser to relayout the page in every browser. But what if you just wanted an animated bounce effect? You could animate the width of the object, but in practice a scale transform would perform much better in most browsers as it typically doesn’t trigger a relayout. So this page just gives you information about which phases are triggered by which properties in which rendering engines.
- shangxiao 9y agoI believe blue1 meant that the page could do with a short explanation at the top… I was wondering the same thing until I realised what it was about.
- oneeyedpigeon 9y agoThe people who need to know this will understand what it is immediately, but I agree that a one-liner at the top couldn't hurt.
- warpech 9y agoWhat is the method of collecting this information? Lecture of https://github.com/GoogleChrome/css-triggers/issues/21 https://github.com/GoogleChrome/css-triggers/issues/21 shows that it might not be accurate.
- warpech 9y agoWhy is this important: https://developers.google.com/web/fundamentals/performance/rendering/ https://developers.google.com/web/fundamentals/performance/r... TL;DR rendering performance
- littlestymaar 9y agoYou should take these advices with a grain of salt because it refers to the legacy rendering pipeline used by current web browers. There is not absolute rule stating that layout and painting must be slow while compositing is not. In fact Mozillians are currently working on a new rendering pipeline[1] based on state of the art rendering tools[2]. This new pipeline should be deployed in firefox in 2018 as a part of the ongoing Quantum project. [1] https://github.com/servo/webrender https://github.com/servo/webrender [2] https://m.youtube.com/watch?v=BTURkjYJ_uk https://m.youtube.com/watch?v=BTURkjYJ_uk
- ryanpetrich 9y agoSeems hardly legacy if it's the rendering pipeline used in all browsers' current release versions. (and I say this as a WebRender enthusiast)
- striking 9y agoYeah, but it makes sense to follow it now, as it affects us now and will continue to do so through at least 2018, until everyone has updated their renderer.
- HugoDaniel 9y agoTwo things to keep in mind: - This is a google chrome project - Hasn't been updated in 2 years [gecko ~1 year] (which is a LOOONG way ago in browsers time) https://github.com/GoogleChrome/css-triggers/tree/master/data https://github.com/GoogleChrome/css-triggers/tree/master/dat...
- diggan 9y agoIt's under GoogleChrome on Github but readme mentions it's not a Google project. > Please note: this is not a Google product
- gsnedders 9y agoVirtually every tool produced by individual Google teams has that disclaimer unless it is actually marketed as a Google product.
- brandon 9y agoAlso individual Googlers who want to open source their work without going through the copyright assignment paperwork. A lot of the projects bearing that disclaimer are passion projects done 100% outside of work hours.
- pygy_ 9y agoIt is a Google project, not a Google product.
- nkjoep 9y agoThat would be useful if integrated with caniuse.com. Overall you'll learn everything will trigger everything.
- weego 9y agoIf you're spending time worrying about this you're either working on an incredibly mature product with nothing other than micro-optimisations left as business requirements, or you don't understand opportunity cost.
- jaffathecake 9y agoPer-frame layout (and sometimes paint) is the main cause of janky animation in browsers, especially mobile.
- notjustanymike 9y agoLet's talk data vis for a minute. The three values are sequential, so there's no need for tic-tac bar charts on every item. There's also no need for two colors in the same chart, that's just more cognitive load. Something like this is crying out for a heat map, so you can quickly scan. Here's my take after some quick hacking: https://i.imgur.com/w4AkvQb.png https://i.imgur.com/w4AkvQb.png
- mortenjorck 9y agoThis is a huge improvement. The original took me awhile to wrap my mind around because it uses more dimensions than the data actually has axes - your reduction to a single dimension of dot shading is a much tighter mapping.
- notjustanymike 9y agoThanks! Considering it took 5 minutes in dev tools, I can probably fork it this weekend :)
- function_seven 9y agoYours is much, much nicer. But it doesn't match the original chart. align-content in Gecko, for example. The multi-color tic tac charts says that it doesn't trigger anything on subsequent updates, but your chart says layout is triggered.
- notjustanymike 9y agoMine's just a dev tools hack (literally just changed some CSS classes around), so the obvious solution for mine would to not show a circle. I've never been a fan of traffic light style visualizations, which show a shape even when there's no value. The empty tic-tacs in the original do this, and prevents any advantage in parsing the vis you'd get from cognitive dissonance of the shapes. Not showing a shape when there's no data is the correct solution.
- antibland 9y agoAccessibility guy here. Don't forget that color blind/low vision users are going to have a tough time parsing meaning from that table. Color shouldn't be solely responsible for conveying informational meaning. Consider pairing color with another visual indicator like an icon.
- pagnol 9y agoI would be interested in finding a way to include this information when I edit css/sass in Emacs. Is there something I could use or would I need to write a new minor mode myself? (I have been using Emacs for some time now but rarely write any elisp myself.)
- rocky1138 9y agoCool website. I just wish it didn't break my back button.
- lol768 9y agoYeah, it completely abuses history.pushState...
- chrisallick 9y agoWhen you tap the header status bar on mobile safari this site doesn’t scroll back to top. Why?