SlideShare a Scribd company logo
WEBASSEMLBY IN HOUDINI CSS
IS IT POSSIBLE?
Oleksandr Skachkov @alSkachkov
ABOUT ME
• Itera’s FrontEnd Tech Lead
• WebKit contributor
• WebAssembly enthusiast
• Twitter: @alSkachkov
• Early days of CSS
• Houdini CSS
• WebAssembly
• Houdini CSS & WebAssembly together
Web is one of the most popular platform
What was before
WebAssembly in Houdini CSS, is it possible?
Browsers
with own stylesheet language
WebAssembly in Houdini CSS, is it possible?
CSS was born
Håkon Wium Lie
Bert Bos
WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?
CSS with Pre-Processors
WebAssembly in Houdini CSS, is it possible?
CSS3
WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?
Can we evolve CSS farther?
YES WE CAN, BUT
CHALLENGES
• Too many CSS properties 373 (https://meiert.com/en/indices/css-properties/)
• Adding new features might take too long
CSS conic-gradient case
CSS CONIC-GRADIENT
CSS CONIC-GRADIENT
CSS CONIC-GRADIENT
CSS CONIC-GRADIENT
https://twitter.com/anatudor/status/611659012212441088
CSS CONIC-GRADIENT
How long it takes to land in browsers:
• Chrome – 2 years (delivered)
• WebKit/Safari – 3 years (delivered recently)
• Firefox – not started
• Microsoft Edge – not started
CHALLENGES
• Too many CSS properties 373 (https://meiert.com/en/indices/css-properties/)
• Adding new features might take too long:
• conic-gradient – 3 years
• grid layout – 5 years
• flex– 7 years
• It is impossible to extend CSS properties by self
Can solve this?
WebAssembly in Houdini CSS, is it possible?
The Extensibility Web Manifesto
The web platform should expose low-level
capabilities that … , such as HTML and CSS,
allowing authors to understand and replicate
them.
HOW IT IS DONE IN A WEB
• HTML – Shadow DOM and Web Components
• JS + Event Loop + WEB API – FrameWorks, Libraries and Modules
• CSS - ?
a new set of APIs that will give developers the power to extend CSS itself
Houdini CSS
https://drafts.css-houdini.org/
RENDERING PIPLINE
HOUDINI CSS
WORKLET
Worklet is a lightweight version of Web Workers
addPromise = worklet.addModule(moduleURL);
CSS.paintWorklet.addModule(“Worklet.js”)
CSS LAYOUT API WORKLET
CSS LAYOUT API WORKLET
DEMO
CSS PAINT API WORKLET
CSS PAINT API WORKLET
CSS PAINT API WORKLET
CSS PAINT API WORKLET
CSS PAINT API WORKLET
CSS PAINT API WORKLET
CSS PAINT CONTEXT
PaintRenderingContext2D limited subset of CanvasRenderingContext2D
• not implement :
• CanvasImageData
• CanvasText
• Implements draw operations:
• drawImage()
• fillRect()
CSS CUSTOM PROPERTY
CSS CUSTOM PROPERTY
CSS CUSTOM PROPERTY
CSS CUSTOM PROPERTY
• <color>
• <image>
• <url>
• <integer>
• …
DEMO
https://github.com/gskachkov/houdini-css-wasm
CAN WE USE HOUDINI CSS?
PROS
• Gives you the freedom to create your own visual effects
• Doesn’t rely on adding extra elements or pseudo-elements to the DOM
• Provide abstraction and modularization for visual logic within a paint worklet
• Allow developers to use new features before browsers implement them
CONS
• Still in development
• Browsers have to load a worklet before use it
Paint something complicated
FRACTALS
Can we render faster?
WebAssembly in Houdini CSS, is it possible?
if we use WebAssembly
WebAssembly in Houdini CSS, is it possible?
• Announced in 17 June 2015
• Supported by major Browsers
• Developed by WebAssembly Working
Group (W3C)
• Draft specific published 15 Feb 2018
WebAssembly – New Hope
What is WebAssembly (aka WASM)?
WebAssembly is build target
WebAssembly in Houdini CSS, is it possible?
safe, portable, low-level code format designed for efficient execution
and compact representation
https://webassembly.github.io/spec/intro
C - Source code
RUST - Source code
S - Expression
S - Expression
fast to load
Byte code
WebAssembly in Houdini CSS, is it possible?
Will WebAssembly replace JavaScript?
Will WebAssembly replace JavaScript?
Not now ☺
but WebAssembly will transform web
WASM WILL BRING TO WEB
•New languages
•Predictable high performance
WEBASSEMBLY RIGHT NOW
CAN WE USE WEBASSEMBLY?
Yes we can
BUILD TARGET FOR
• C/C++
• Rust
• C# - Mono and CoreRT
• Go
• BrainFuck
• Even more: https://github.com/appcypher/awesome-wasm-langs
WEBASSEMBLY & HUIDINI CSS
Can we use WebAssembly in Worklets?
YES WE CAN, BUT
CHALLENGES
• How to load WebAssembly module within Worklets?
• How to run it within Worklet?
WEBASSEBLY IN WORKLET
• encode WebAssembly to BASE64 and decode during Worklet load
• load webassembly and inline it to tag by:
const src = urlFromTag("script[language='javascript+layout’]”);
CSS.paintWorklet.addModule(src);
DEMO
https://github.com/gskachkov/houdini-css-wasm
PERFORMANCE WITH WEBASSEMLY
SUMMARY
SUMMARY
• WebAssembly provide good performance improvements
• Access to ‘Canvas’ from WebAssembly really fast
• Size of worklet with WebAssembly might be bigger to pure js
• ‘Canvas’ object in Worklet is very limited to usual canvas
• CSS Houdini API is very promising technology
• CSS Houdini API still in development
RESOURCES ABOUT WEBASSEMBLY
• Articles:
• https://hacks.mozilla.org/category/webassembly/
• https://pspdfkit.com/blog/
• Site: http://webassembly.org/
• Github: https://github.com/WebAssembly/
• Twitter: @WasmWeekly - WebAssemblyWeekly
RESOURCES ABOUT HOUDINY CSS
• Spec - https://drafts.css-houdini.org/css-paint-api-1
• Articles:
• Interactive Introduction to CSS Houdini, Sam Richard
• Houdini: Maybe The Most Exciting Development In CSS You’ve Never Heard Of, Philip
Walton
• What Houdini Means for Animating Transforms, Ana Tudor
• The CSS Paint API, Ruth John
RESOURCES ABOUT HOUDINY CSS
• Demos:
• Interactive Introduction to CSS Houdini, Sam Richard
• https://css-houdini.rocks
• https://googlechromelabs.github.io/houdini-samples/
THANKS!
QUESTIONS?

More Related Content

What's hot (20)

PPTX
Single Page Application Development with backbone.js and Simple.Web
Chris Canal
 
PPTX
Breaking the eggshell: From .NET to Node.js
Barbara Fusinska
 
PPTX
Web assembly: a brief overview
Pavlo Iatsiuk
 
PPTX
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
Irfan Maulana
 
PPT
Get MEAN! Node.js and the MEAN stack
Nicholas McClay
 
PPTX
PHP Indonesia - Nodejs Web Development
Irfan Maulana
 
PDF
Isomorphic JavaScript: #DevBeat Master Class
Spike Brehm
 
PDF
Mean Stack - An Overview
Naveen Pete
 
PDF
The MEAN Stack
Md. Ziaul Haq
 
PDF
NodeSummit - MEAN Stack
Valeri Karpov
 
PDF
Building Isomorphic JavaScript Apps - NDC 2015
Eirik Vullum
 
PDF
Nuxt로 사내서비스 구현하면서 얻은 경험 공유
민환 조
 
PDF
AWS, is it interesting?
Duy Tan Geek
 
PPTX
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
Hariharan Ganesan
 
PPTX
Mean PPT
Harendra Singh Bisht
 
PPTX
Build fast word press site in react in 30 mins with frontity
Imran Sayed
 
PDF
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
Spike Brehm
 
PPTX
MEAN Stack
Dotitude
 
PPT
Nodejs - Building a RESTful API
Sang Cù
 
Single Page Application Development with backbone.js and Simple.Web
Chris Canal
 
Breaking the eggshell: From .NET to Node.js
Barbara Fusinska
 
Web assembly: a brief overview
Pavlo Iatsiuk
 
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
Irfan Maulana
 
Get MEAN! Node.js and the MEAN stack
Nicholas McClay
 
PHP Indonesia - Nodejs Web Development
Irfan Maulana
 
Isomorphic JavaScript: #DevBeat Master Class
Spike Brehm
 
Mean Stack - An Overview
Naveen Pete
 
The MEAN Stack
Md. Ziaul Haq
 
NodeSummit - MEAN Stack
Valeri Karpov
 
Building Isomorphic JavaScript Apps - NDC 2015
Eirik Vullum
 
Nuxt로 사내서비스 구현하면서 얻은 경험 공유
민환 조
 
AWS, is it interesting?
Duy Tan Geek
 
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
Hariharan Ganesan
 
Build fast word press site in react in 30 mins with frontity
Imran Sayed
 
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
Spike Brehm
 
MEAN Stack
Dotitude
 
Nodejs - Building a RESTful API
Sang Cù
 

Similar to WebAssembly in Houdini CSS, is it possible? (20)

PDF
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018
Codemotion
 
PDF
Houdini - What lies ahead
Arun Michael Dsouza
 
PDF
Chrome Dev Summit 2018 - Personal Take Aways
Riza Fahmi
 
PDF
Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
OdessaJS Conf
 
PPTX
آشنایی با تکنولوژی جدید Houdini
Web Standards School
 
PPTX
Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)
Nathaniel Bagnell
 
PDF
WebAssemlby vs JavaScript
Alexandr Skachkov
 
PDF
Web Summer Camp Keynote
Rachel Andrew
 
PDF
WebKit2 And You (GUADEC 2013)
Igalia
 
PPTX
The Rise of WebAssembly Transforming Web Development for the Modern Era.pptx
SoftflixIT
 
PDF
HTML5 and CSS3: does now really mean now?
Chris Mills
 
PDF
Enjoying the full stack - Frontend 2010
Christian Heilmann
 
PDF
WebAssembly - czy dzisiaj mi się to przyda do pracy?
Brainhub
 
KEY
Rockstar Graphics with HTML5
Dave Balmer
 
PDF
KharkivJS: Flaws of the Web Components in 2019 and how to address them
Vlad Fedosov
 
PPT
CSS3 and a brief introduction to Google Maps API v3
Jeffrey Barke
 
PDF
Stapling and patching the web of now - ForwardJS3, San Francisco
Christian Heilmann
 
PPT
Web assembly overview by Mikhail Sorokovsky
Valeriia Maliarenko
 
PDF
CSS Training Online-Online CSS Course css course online learning html and css...
Evanta Technologies
 
PDF
Boyan Mihaylov - Is web assembly the killer of javascript
Codemotion
 
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018
Codemotion
 
Houdini - What lies ahead
Arun Michael Dsouza
 
Chrome Dev Summit 2018 - Personal Take Aways
Riza Fahmi
 
Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
OdessaJS Conf
 
آشنایی با تکنولوژی جدید Houdini
Web Standards School
 
Application Development with HTML5 (Microsoft TechDays 2011 - DEV302)
Nathaniel Bagnell
 
WebAssemlby vs JavaScript
Alexandr Skachkov
 
Web Summer Camp Keynote
Rachel Andrew
 
WebKit2 And You (GUADEC 2013)
Igalia
 
The Rise of WebAssembly Transforming Web Development for the Modern Era.pptx
SoftflixIT
 
HTML5 and CSS3: does now really mean now?
Chris Mills
 
Enjoying the full stack - Frontend 2010
Christian Heilmann
 
WebAssembly - czy dzisiaj mi się to przyda do pracy?
Brainhub
 
Rockstar Graphics with HTML5
Dave Balmer
 
KharkivJS: Flaws of the Web Components in 2019 and how to address them
Vlad Fedosov
 
CSS3 and a brief introduction to Google Maps API v3
Jeffrey Barke
 
Stapling and patching the web of now - ForwardJS3, San Francisco
Christian Heilmann
 
Web assembly overview by Mikhail Sorokovsky
Valeriia Maliarenko
 
CSS Training Online-Online CSS Course css course online learning html and css...
Evanta Technologies
 
Boyan Mihaylov - Is web assembly the killer of javascript
Codemotion
 
Ad

Recently uploaded (20)

PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Human Resources Information System (HRIS)
Amity University, Patna
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Ad

WebAssembly in Houdini CSS, is it possible?