SlideShare a Scribd company logo
FUNC T IONAL
IMMUT AB LE
CS S
by Alexey Topolyanskiy
@devilcoders
https://alexify.me
Functional Immutable CSS
CS S JOKE
Two CSS properties walk into a bar.
A barstool in a completely different
bar falls over.
Thomas Fuchs @thomasfuchs
"
AGENDA
What is CSS Methodology?
What is Functional CSS?
The Plan to Fix All of Our CSS Issues
G OOD OL D CS S
• Easy to learn
• Easy to write
• Hard to refactor
CS S IS H AR D
• Everything is global scope.
• Everything is mutable.
• Specificity
CS S ME THODOLOGY
... is a formal, documented system for authoring
CSS in a way that allows us to develop, maintain
and scale the front-end as a set of small,
isolated modules, rather than as one massive
lump of indivisible code.
... is a peace of mind for developers.
R EADY TO US E
SMACSS
Point North
ITCSS
OOCSS
Title CSS
idiomatic-css
Atomic Design
SUIT CSS
Kickoff CSS
MaintainableCSS
Y OU W IL L S T AR T W ITH
BEM
BEM is proudly made by Yandex
BUT Y OU W IL L US UAL LY
END UP W ITH
Atomic- BEMITSC
WH AT IS FUNC T IONAL CS S?
... is a set of classes, that
represents simple functions that do
only one thing.
TH EY LOOK L IKE TH IS
.f1 { font-size: 30px; }
.f2 { font-size: 24px; }
.f3 { font-size: 21px; }
.f4 { font-size: 18px; }
.f5 { font-size: 16px; }
.f6 { font-size: 14px; }
OR TH IS
.mv3 {
margin-top: 1rem;
margin-bottom: 1rem;
}
OR EV EN TH IS
.bg-animate,
.bg-animate:hover,
.bg-animate:focus {
transition: background-color .15s ease-in-out;
}
COR E CONCEP TS
1.Performance
2.Clarity
3.Reusability
4.Immutability
P R OJ EC T ATL AS
Our own plan for World Domainationfixing CSS issues
OUR IS S UES
• Inconsistent styles
• Huge CSS codebase
• No Design System
• UI is not responsive
• Tons of CSS-related issues
T ES T MY CS S
• 341 - Complex Selectors
• 25 - Duplicated Properties
• 100 - Duplicated Selectors
• 220 - Importants!
• 643 - Multi Classes Selectors
• 27 - Old IE Fixes
• 119 - Old Property Prefixes
• 14 - Property Resets
• 567 - Qualified Selectors
• 75 - Redundant Body Selectors
• 30 - Redundant Child Nodes Selectors
• 94 - Universal Selectors
http://www.testmycss.com
CS S S T ATS
• 2,743 - Rules
• 4,379 - Selectors
• 7,230 - Declarations
• 174 - Properties
• 40 - Unique Colors
• 35 - Unique Background Colors
• 51 - Unique Font Sizes
• 13 - 13 Media Queries
http://cssstats.com
TH IS IS BAD
header#admin-main-header.header--bar-right-part .dropdown-menu.help li a {
line-height: 35px;
}
WHY?
• Everything just works somehow
• You can be more !important than others
• Too many ways to do same thing
• Refactoring is just too fucking scary
• Developers keep writing CSS!
TH E PL AN
• Remove all our CSS
• Choose a framework
• Rewrite all HTML markup
• Make CSS Immutable
TH E S OLUT ION
• CSS Toolkit: Tachyons
• CSS Processor: PostCSS
• Assets Bundler: Webpack
• IPS*: Immutable-CSS + Stylelint
IPS stands for Issue Preventing System
Lightweight - 14kb
Documented - Website is used as Design System
Responsive - Every class has dedicated @media
Customizable - Easy to extend & modify
T ACHY ONS
BEFOR E T ACHY ONS
W ITH T ACHY ONS
IT WORKS WEL L FOR
PL AN APP R OV ED!
Implememtation started on Dec 5th
This slide is here, so I will
not forget to give a short
summary before I will run to
get a beer!
TH ANK Y OU!
Questions anyone?

More Related Content

PPTX
Hammersmith fundamentals html fundamentals
PPTX
Journey To The Front End World - Part2 - The Cosmetic
PPTX
Course outline Website Design & Development
PPTX
SASS - Syntactically Awesome Stylesheet
PPTX
.Less - CSS done right
PDF
October 2014 - USG Rock Eagle - Sass 101
PPSX
Documentation Tools
PDF
快速开发Css
Hammersmith fundamentals html fundamentals
Journey To The Front End World - Part2 - The Cosmetic
Course outline Website Design & Development
SASS - Syntactically Awesome Stylesheet
.Less - CSS done right
October 2014 - USG Rock Eagle - Sass 101
Documentation Tools
快速开发Css

What's hot (16)

KEY
Advanced sass/compass
PDF
DrupalCamp Chattanooga - September 2014 - Sass 101
PPTX
Start using less css
PPTX
Oooh shiny
PPTX
PDF
Bootstrap UI Library Introduction
KEY
Getting Started with .Net Framewor
PPTX
Css(cascading style sheets)
PPTX
SFV Jaycees - “Author/User Profile Complete Edit”
PPTX
Css 3
PPTX
Css 3
KEY
Wrangling the CSS Beast with Sass
PPTX
We Don't Need Roads: A Developers Look Into SQL Server Indexes
KEY
CSS Frameworks
Advanced sass/compass
DrupalCamp Chattanooga - September 2014 - Sass 101
Start using less css
Oooh shiny
Bootstrap UI Library Introduction
Getting Started with .Net Framewor
Css(cascading style sheets)
SFV Jaycees - “Author/User Profile Complete Edit”
Css 3
Css 3
Wrangling the CSS Beast with Sass
We Don't Need Roads: A Developers Look Into SQL Server Indexes
CSS Frameworks
Ad

Viewers also liked (20)

PPT
Digital Nomading on Rails
PPTX
Права інтелектуальної власності в IT сфері.
PDF
Overcommit for #pivorak
PDF
"5 skills to master" by Alexander Skakunov
PDF
Espec |> Elixir BDD
PPTX
Building component based rails applications. part 1.
PDF
The Silver Bullet Syndrome by Alexey Vasiliev
PDF
"Ruby meets Event Sourcing" by Anton Paisov
PDF
Lightweight APIs in mRuby
PDF
UDD: building polyglot anti-framework by Marek Piasecki
PDF
Trailblazer Introduction by Nick Sutterer
PPTX
Building Component Based Rails Applications. Part 2.
PDF
GIS on Rails
PDF
Pivorak Clojure by Dmytro Bignyak
PDF
Andriy Vandakurov about "Frontend. Global domination"
PDF
“Object Oriented Ruby” by Michał Papis.
PDF
Building Web-API without Rails, Registration or SMS
PDF
"Meet rom_rb & dry_rb" by Piotr Solnica
PDF
Pivorak How to write better sentences in English
PDF
From Rails legacy to DDD - Pivorak, Lviv
Digital Nomading on Rails
Права інтелектуальної власності в IT сфері.
Overcommit for #pivorak
"5 skills to master" by Alexander Skakunov
Espec |> Elixir BDD
Building component based rails applications. part 1.
The Silver Bullet Syndrome by Alexey Vasiliev
"Ruby meets Event Sourcing" by Anton Paisov
Lightweight APIs in mRuby
UDD: building polyglot anti-framework by Marek Piasecki
Trailblazer Introduction by Nick Sutterer
Building Component Based Rails Applications. Part 2.
GIS on Rails
Pivorak Clojure by Dmytro Bignyak
Andriy Vandakurov about "Frontend. Global domination"
“Object Oriented Ruby” by Michał Papis.
Building Web-API without Rails, Registration or SMS
"Meet rom_rb & dry_rb" by Piotr Solnica
Pivorak How to write better sentences in English
From Rails legacy to DDD - Pivorak, Lviv
Ad

Similar to Functional Immutable CSS (20)

PDF
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
KEY
WordCamp NYC - DRY CSS
PDF
The Coding Designer's Survival Kit - Capital Camp
PDF
OOCSS in the Real World: A Case Study from the CBC
PPTX
OmniUpdate User Training Conference 2014: Our "Special Sauce" Responsive Desi...
PPT
Css week10 2019 2020 for g10 by eng.osama ghandour
PPTX
Cascading Style Sheets - CSS
PPT
Web design-workflow
PPTX
Tips & Tricks SQL in the City Seattle 2014
PPT
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
PPT
Css best practices style guide and tips
PDF
CSS workshop @ OutSystems
PDF
Modular HTML & CSS
PDF
Crash Course in CSS Grid plus FlexBox - Nolan Erck
PPTX
SilverStripe From a Developer's Perspective
PPTX
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
PDF
Highly Maintainable, Efficient, and Optimized CSS
PDF
What is-sass-by-lucas-castro
PPT
Pertemuan 7
PPTX
Hardcore CSS
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
WordCamp NYC - DRY CSS
The Coding Designer's Survival Kit - Capital Camp
OOCSS in the Real World: A Case Study from the CBC
OmniUpdate User Training Conference 2014: Our "Special Sauce" Responsive Desi...
Css week10 2019 2020 for g10 by eng.osama ghandour
Cascading Style Sheets - CSS
Web design-workflow
Tips & Tricks SQL in the City Seattle 2014
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
Css best practices style guide and tips
CSS workshop @ OutSystems
Modular HTML & CSS
Crash Course in CSS Grid plus FlexBox - Nolan Erck
SilverStripe From a Developer's Perspective
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Highly Maintainable, Efficient, and Optimized CSS
What is-sass-by-lucas-castro
Pertemuan 7
Hardcore CSS

More from Pivorak MeetUp (20)

PDF
Lisp(Lots of Irritating Superfluous Parentheses)
PDF
Some strange stories about mocks.
PDF
Business-friendly library for inter-service communication
PDF
How i was a team leader once
PDF
Rails MVC by Sergiy Koshovyi
PDF
Introduction to Rails by Evgeniy Hinyuk
PPTX
Ruby OOP (in Ukrainian)
PDF
Testing in Ruby
PDF
Ruby Summer Course by #pivorak & OnApp - OOP Basics in Ruby
PDF
The Saga Pattern: 2 years later by Robert Pankowecki
PDF
Data and Bounded Contexts by Volodymyr Byno
PDF
Successful Remote Development by Alex Rozumii
PDF
Origins of Elixir programming language
PDF
Multi language FBP with Flowex by Anton Mishchuk
PDF
Detective story of one clever user - Lightning Talk By Sergiy Kukunin
PDF
CryptoParty: Introduction by Olexii Markovets
PDF
How to make first million by 30 (or not, but tryin') - by Marek Piasecki
PDF
GIS on Rails by Oleksandr Kychun
PDF
Unikernels - Keep It Simple to the Bare Metal
PDF
HTML Canvas tips & tricks - Lightning Talk by Roman Rodych
Lisp(Lots of Irritating Superfluous Parentheses)
Some strange stories about mocks.
Business-friendly library for inter-service communication
How i was a team leader once
Rails MVC by Sergiy Koshovyi
Introduction to Rails by Evgeniy Hinyuk
Ruby OOP (in Ukrainian)
Testing in Ruby
Ruby Summer Course by #pivorak & OnApp - OOP Basics in Ruby
The Saga Pattern: 2 years later by Robert Pankowecki
Data and Bounded Contexts by Volodymyr Byno
Successful Remote Development by Alex Rozumii
Origins of Elixir programming language
Multi language FBP with Flowex by Anton Mishchuk
Detective story of one clever user - Lightning Talk By Sergiy Kukunin
CryptoParty: Introduction by Olexii Markovets
How to make first million by 30 (or not, but tryin') - by Marek Piasecki
GIS on Rails by Oleksandr Kychun
Unikernels - Keep It Simple to the Bare Metal
HTML Canvas tips & tricks - Lightning Talk by Roman Rodych

Recently uploaded (20)

PDF
System and Network Administraation Chapter 3
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
top salesforce developer skills in 2025.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Transform Your Business with a Software ERP System
PDF
Designing Intelligence for the Shop Floor.pdf
System and Network Administraation Chapter 3
Upgrade and Innovation Strategies for SAP ERP Customers
Wondershare Filmora 15 Crack With Activation Key [2025
Design an Analysis of Algorithms II-SECS-1021-03
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Navsoft: AI-Powered Business Solutions & Custom Software Development
2025 Textile ERP Trends: SAP, Odoo & Oracle
top salesforce developer skills in 2025.pdf
Understanding Forklifts - TECH EHS Solution
CHAPTER 2 - PM Management and IT Context
Which alternative to Crystal Reports is best for small or large businesses.pdf
Softaken Excel to vCard Converter Software.pdf
wealthsignaloriginal-com-DS-text-... (1).pdf
Transform Your Business with a Software ERP System
Designing Intelligence for the Shop Floor.pdf

Functional Immutable CSS

  • 1. FUNC T IONAL IMMUT AB LE CS S by Alexey Topolyanskiy @devilcoders https://alexify.me
  • 3. CS S JOKE Two CSS properties walk into a bar. A barstool in a completely different bar falls over. Thomas Fuchs @thomasfuchs "
  • 4. AGENDA What is CSS Methodology? What is Functional CSS? The Plan to Fix All of Our CSS Issues
  • 5. G OOD OL D CS S • Easy to learn • Easy to write • Hard to refactor
  • 6. CS S IS H AR D • Everything is global scope. • Everything is mutable. • Specificity
  • 7. CS S ME THODOLOGY ... is a formal, documented system for authoring CSS in a way that allows us to develop, maintain and scale the front-end as a set of small, isolated modules, rather than as one massive lump of indivisible code. ... is a peace of mind for developers.
  • 8. R EADY TO US E SMACSS Point North ITCSS OOCSS Title CSS idiomatic-css Atomic Design SUIT CSS Kickoff CSS MaintainableCSS
  • 9. Y OU W IL L S T AR T W ITH BEM BEM is proudly made by Yandex
  • 10. BUT Y OU W IL L US UAL LY END UP W ITH Atomic- BEMITSC
  • 11. WH AT IS FUNC T IONAL CS S? ... is a set of classes, that represents simple functions that do only one thing.
  • 12. TH EY LOOK L IKE TH IS .f1 { font-size: 30px; } .f2 { font-size: 24px; } .f3 { font-size: 21px; } .f4 { font-size: 18px; } .f5 { font-size: 16px; } .f6 { font-size: 14px; }
  • 13. OR TH IS .mv3 { margin-top: 1rem; margin-bottom: 1rem; }
  • 14. OR EV EN TH IS .bg-animate, .bg-animate:hover, .bg-animate:focus { transition: background-color .15s ease-in-out; }
  • 15. COR E CONCEP TS 1.Performance 2.Clarity 3.Reusability 4.Immutability
  • 16. P R OJ EC T ATL AS Our own plan for World Domainationfixing CSS issues
  • 17. OUR IS S UES • Inconsistent styles • Huge CSS codebase • No Design System • UI is not responsive • Tons of CSS-related issues
  • 18. T ES T MY CS S • 341 - Complex Selectors • 25 - Duplicated Properties • 100 - Duplicated Selectors • 220 - Importants! • 643 - Multi Classes Selectors • 27 - Old IE Fixes • 119 - Old Property Prefixes • 14 - Property Resets • 567 - Qualified Selectors • 75 - Redundant Body Selectors • 30 - Redundant Child Nodes Selectors • 94 - Universal Selectors http://www.testmycss.com
  • 19. CS S S T ATS • 2,743 - Rules • 4,379 - Selectors • 7,230 - Declarations • 174 - Properties • 40 - Unique Colors • 35 - Unique Background Colors • 51 - Unique Font Sizes • 13 - 13 Media Queries http://cssstats.com
  • 20. TH IS IS BAD header#admin-main-header.header--bar-right-part .dropdown-menu.help li a { line-height: 35px; }
  • 21. WHY? • Everything just works somehow • You can be more !important than others • Too many ways to do same thing • Refactoring is just too fucking scary • Developers keep writing CSS!
  • 22. TH E PL AN • Remove all our CSS • Choose a framework • Rewrite all HTML markup • Make CSS Immutable
  • 23. TH E S OLUT ION • CSS Toolkit: Tachyons • CSS Processor: PostCSS • Assets Bundler: Webpack • IPS*: Immutable-CSS + Stylelint IPS stands for Issue Preventing System
  • 24. Lightweight - 14kb Documented - Website is used as Design System Responsive - Every class has dedicated @media Customizable - Easy to extend & modify T ACHY ONS
  • 25. BEFOR E T ACHY ONS
  • 26. W ITH T ACHY ONS
  • 27. IT WORKS WEL L FOR
  • 28. PL AN APP R OV ED! Implememtation started on Dec 5th
  • 29. This slide is here, so I will not forget to give a short summary before I will run to get a beer!
  • 30. TH ANK Y OU! Questions anyone?