SlideShare uma empresa Scribd logo
THOUGHTFUL ARCHITECTURE AND GOOD
PRACTICES IN CSS
MYTH OR NEW REALITIES?
Hello world!
Senior Frontend Developer @ Boldare
● SCRUM and Agile programming enthusiast
● antiquity and space admirer
● Canada addict
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Some Theory of CSS
W3C:
“CSS is the language for describing the presentation of Web
pages, including colors, layout, and fonts. It allows one to
adapt the presentation to different types of devices, such as
large screens, small screens, or printers. CSS is independent
of HTML and can be used with any XML-based markup
language. (...) This is referred to as the separation of
structure (or: content) from presentation.”
CSS
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Myth or reality?
Cambridge Dictionary:
● “an ancient story or set of stories, especially explaining
the early history of a group of people or about natural
events and facts”
● “a commonly believed but false idea”
MYTH
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Myth or reality?
Cambridge Dictionary:
● “an ancient story or set of stories, especially explaining
the early history of a group of people or about natural
events and facts”
● “a commonly believed but false idea”
MYTH
Example: It is impossible to only talk about CSS
for 45 minutes ;)
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Myth: CSS is always easy and simple
CSS
IS
AWESOME
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Myth: It is impossible to write modular and scalable CSS code
What can we do?
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: methodologies
METHODOLOGIES
Cambridge Dictionary:
“a system of ways of doing, teaching,
or studying something”
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
OOCSS
Reality: methodologies
METHODOLOGIES
Cambridge Dictionary:
“a system of ways of doing, teaching,
or studying something”
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: methodologies
METHODOLOGIES
Cambridge Dictionary:
“a system of ways of doing, teaching,
or studying something”
SM
ACSS
OOCSS
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: methodologies
METHODOLOGIES
Cambridge Dictionary:
“a system of ways of doing, teaching,
or studying something”
BEM
OOCSS
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
SM
ACSS
Reality: methodologies
METHODOLOGIES
Cambridge Dictionary:
“a system of ways of doing, teaching,
or studying something”
ACSS
OOCSS
BEM
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
SM
ACSS
Reality: methodologies
METHODOLOGIES
Cambridge Dictionary:
“a system of ways of doing, teaching,
or studying something”
ITCSS
OOCSS
BEM
ACSS
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
SM
ACSS
Reality: methodologies
METHODOLOGIES
Cambridge Dictionary:
“a system of ways of doing, teaching,
or studying something”
CUBE CSS OOCSS
BEM
ACSS
ITCSS
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
SM
ACSS
Reality: Objective Oriented CSS
OOCSS
● modular and object-oriented CSS
● first, global classes, then more
specialized ones
● separated styles for containers
and content
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: Objective Oriented CSS
OOCSS
● modular and object-oriented CSS
● first, global classes, then more
specialized ones
● separated styles for containers
and content
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: Scalable and Modular Architecture for CSS
SMACSS
● styles are divided into 5 groups:
- basic
- layout (l- prefix)
- modules
- state (is- prefix)
- subject
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: BEM
BEM
● modular CSS code
● elements are divided into:
- blocks (e.g. form)
- elements (e.g. input)
- modifiers (e.g. password input)
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: Atomic CSS
ACSS
● content-independent and reusable
CSS classes
● most often single-line,
responsible for only one setting
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: Inverted Triangle CSS
ITCSS
● CSS code is separated into several
sections (layers)
● it uses 3 principles:
- generic to explicit
- low to high specificity
- far-reaching to localized
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
https://www.creativebloq.com/web-design/manage-large-css-projects-itcss-101517528
Myth: It is impossible to write modular and scalable CSS code
WAIT…
WHY NOT USE SOMETHING
THAT WE ALREADY KNOW?
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Myth: It is impossible to write modular and scalable CSS code
DRY
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Don’t Repeat Yourself
Myth: It is impossible to write modular and scalable CSS code
YAGNI
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
You Ain’t Gonna Need It
Myth: It is impossible to write modular and scalable CSS code
KISS
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Keep It Simple, Silly
Myth: It is impossible to write modular and scalable CSS code
SCA
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Separation of concerns
Myth: It is impossible to write modular and scalable CSS code
SOLID Wikipedia:
“In object-oriented programming, SOLID is a mnemonic
acronym for five design principles intended to make software
designs more understable, flexible and maintainable.
The principles are a subset of many principles promoted by
American software engineer and instructor Robert C. Martin,
first introduced in his 2000 paper Design Principles
and Design Patterns”
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Myth: It is impossible to write modular and scalable CSS code
SOLID
SOLID is an acronym for the first five OOD principles:
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
D
I
ependency Inversion Principle
nterface Segregation Principle
L iskov Substitution Principle
O pen closed Principle
S ingle responsibility Principle
Myth: It is impossible to write modular and scalable CSS code
SOLID
Robert C. Martin “Uncle Bob”
American software engineer, instructor,
author of many books on software engineering,
founder of the Agile Manifesto
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Myth: It is impossible to use Single Responsibility Principle in CSS
SOLID SRP
a class should only have one responsibility
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Myth: It is impossible to use Open Closed Principle in CSS
SOLID OCP
a class should be open to extensions
and closed to modifications
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Myth/True: It is impossible to use Liskov Substitution Principle in CSS
SOLID LSP
a class that extends to another class
should not change the behavior
of the base class
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Myth/True: It is impossible to use Interface Segregation Principle in CSS
SOLID ISP
many dedicated classes are better
than one very general one
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Myth/True: It is impossible to use Dependency Inversion Principle in CSS
SOLID DIP
changing the styles of the child classes
should not affect the styles
of the parent classes
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: CSS preprocessors
PREPROCESSORS
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: CSS preprocessors
NESTING
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: CSS preprocessors
INHERITANCE
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: CSS preprocessors
MIXINS
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: CSS preprocessors
LOOPS
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: CSS frameworks
FRAMEWORKS
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: CSS frameworks
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
FRAMEWORKS
https://stateofcss.com
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Reality: CSS Styleguides
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
CSS Testing
Emulators
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
CSS Testing
Syntax
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
CSS Testing
Regression
Reality: design system
DESIGN SYSTEM
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
“At FOWA 2013 in London, Mark Otto described a design system as
“everything that makes up your product”
Everything? Everything. From typography, layouts and grids, colors, icons,
components and coding conventions, to voice and tone, style-guide and
documentation, a design system is bringing all of these together in a way
that allows your entire team to learn, build, and grow.”
https://css-tricks.com/design-systems-building-future/
Reality: design system
DESIGN SYSTEM
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
https://stateofcss.com
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
DECLARATIVE / IMPERATIVE programming language?
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
DECLARATIVE IMPERATIVE
describes a detailed sequence of steps that
leads to a solution (how to do it)
- a sequence of commands to be
executed by the computer
- requesting some action to be performed
- the result of the operation is stored for
later operations
- performing more complex expressions
consisting of arithmetic operations
and entire functions
JavaScript, PHP
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
DECLARATIVE IMPERATIVE
describes the conditions that the final solution
must meet (what we want to achieve)
describes a detailed sequence of steps that
lead to solution (how to do it)
- independence
(the end result doesn’t depend on any
external condition)
- statelessness
(it has no internal state that is preserved
between calls)
- determinism
(always gives the same result for the
same input arguments)
- a sequence of commands to be
executed by the computer
- requesting some action to be performed
- the result of the operation is stored for
later operations
- performing more complex expressions
consisting of arithmetic operations
and entire functions
CSS, HTML JavaScript, PHP
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
DESCRIPTIVE PROGRAMMABLE
- it only describes the data structures
and the expected result
- is most often not Turing complete or it
achieves completeness in some other
way
- its declarative model of computation is
Turing complete
CSS, HTML, SQL Prolog
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
BUT...
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
CSS is gaining imperative features
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
CSS is gaining imperative features
FUNCTIONS
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
CSS is gaining imperative features
FUNCTIONS
OPERATORS
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
CSS is gaining imperative features
FUNCTIONS
OPERATORS
MATH VARIABLES
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
CSS is gaining imperative features
FUNCTIONS
OPERATORS
MATH VARIABLES
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
TURING MACHINE programming language?
Is CSS a programming language?
CSS
Douglas Crockford
JavaScript guru,
American computer programmer and entrepreneur,
writer and speaker on JavaScript
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
Wikipedia:
“In computability theory, a system of data-manipulation rules (such as a computer's instruction set, a programming
language, or a cellular automaton) is said to be Turing-complete or computationally universal if it can be used to
simulate any Turing machine. This means that this system is able to recognize or decide other data-manipulation rule
sets. Turing completeness is used as a way to express the power of such a data-manipulation rule set. (...)
To show that something is Turing-complete, it is enough to show that it can be used to simulate some Turing-complete
system. For example, an imperative language is Turing-complete if it has conditional branching (e.g., "if" and "goto"
statements, or a "branch if zero" instruction; see one-instruction set computer) and the ability to change an arbitrary
amount of memory (e.g., the ability to maintain an arbitrary number of data items). Of course, no physical system can
have infinite memory; but if the limitation of finite memory is ignored, most programming languages are otherwise
Turing-complete.
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
Rule 110 cellular automaton
Wikipedia:
In an elementary cellular automaton, a one-dimensional pattern of 0s and 1s evolves according to a simple set of rules. Whether a point in the
pattern will be 0 or 1 in the new generation depends on its current value, as well as on those of its two neighbors.
Set of rules:
Current pattern 111 110 101 100 011 010 001 000
New state for center cell 0 1 1 0 1 1 1 0
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
https://jsfiddle.net/Camilo/eQyBa/
Rule 110 cellular automaton
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
CSS is NOT Turing complete
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
CSS + HTML is Turing complete
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
CSS + HTML is Turing complete
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
CSS + HTML + USER INTERACTION is Turing complete
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
DOMAIN - SPECIFIC / GENERAL - PURPOSE programming language?
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
DOMAIN - SPECIFIC GENERAL - PURPOSE
a programming language that is widely used
across all application domains and has no
special functionality for a particular domain
JavaScript, PHP
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
DOMAIN - SPECIFIC GENERAL - PURPOSE
a programming language adapted to solve a
specific problem area, a specific
representation of a problem or a specific
technique for solving them
a programming language that is widely used
across all application domains and has no
special functionality for a particular domain
HTML, CSS JavaScript, PHP
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
CONTEXTUAL programming language?
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
Wikipedia:
“In computer science, a task context
is the minimal set of data used by a
task (which may be a process, thread,
or fiber) that must be saved to allow a
task to be interrupted, and later
continued from the same point.
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
COMPLEX programming language?
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
FLEXIBILITY
DEMANDING
DISCIPLINE
BROWSER
COMPATIBILITY
RESILIENCE
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
FLEXIBILITY
DEMANDING
DISCIPLINE
RESILIENCE
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
FLEXIBILITY
DEMANDING
DISCIPLINE
BROWSER
COMPATIBILITY
RESILIENCE
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
FLEXIBILITY
DEMANDING
DISCIPLINE
BROWSER
COMPATIBILITY
RESILIENCE
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
EASY TO LEARN language?
Reality: low entry threshold for CSS
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
https://stateofcss.com
Reality: CSS roadmap 2021
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Preprocessors
Frameworks
Methodologies
Styled
Component
CSS Module
CSS-in-JS
Reality: CSS can be complicated
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
https://codepen.io/ivorjetski/details/xMJoYO
Reality: CSS can be complicated
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
https://codepen.io/_fbrz/pen/whxbF
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
LOWER EFFORT language?
Is CSS a programming language?
Adam Argyle
Chrome CSS Developer Advocate at Google,
UI + UX Specialized Full Stack Web App Engineer
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
TO SUM IT UP...
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
CSS is a WORTHY language!
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Is CSS a programming language?
Chris Coyier
web designer and developer,
CSS-TRICKS creator,
CodePen co-founder,
writer and speaker
Is CSS a programming language?
CSS
Lea Verou
software developer, speaker and author,
Invited Expert in the W3C CSS Working Group,
W3C Technical Architecture Group (TAG) member
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
We are all developers :)
Thank you!
CONTACT ME
amatysiak88@gmail.com
https://www.linkedin.com/in/matysiakanna/
ARE YOU BOLD ENOUGH?
Visit boldare.com/career

Mais conteúdo relacionado

Semelhante a Thoughtful architecture and good practices in CSS - myth or new realities

slides-students-C04.pdf
slides-students-C04.pdfslides-students-C04.pdf
slides-students-C04.pdf
MonkeyDLuffy708724
 
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
Eric Carlisle
 
70 Expert Ideas For Better Css
70 Expert Ideas For Better Css70 Expert Ideas For Better Css
70 Expert Ideas For Better Css
fherz
 
Introducing PostCSS
Introducing PostCSSIntroducing PostCSS
Introducing PostCSS
Rubén Crespo Álvarez
 
CSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlCSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. Control
Christian Heilmann
 
Is everything we used to do wrong?
Is everything we used to do wrong?Is everything we used to do wrong?
Is everything we used to do wrong?
Russ Weakley
 
Get Started With Tailwind React and Create Beautiful Apps.pdf
Get Started With Tailwind React and Create Beautiful Apps.pdfGet Started With Tailwind React and Create Beautiful Apps.pdf
Get Started With Tailwind React and Create Beautiful Apps.pdf
RonDosh
 
50 css tools and resources from 2014
50 css tools and resources from 201450 css tools and resources from 2014
50 css tools and resources from 2014
LThemeStore
 
CSS Custom Properties (aka CSS Variable)
CSS Custom Properties (aka CSS Variable)CSS Custom Properties (aka CSS Variable)
CSS Custom Properties (aka CSS Variable)
Geoffrey Croftє
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
Amey Parab
 
Authoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & SassAuthoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & Sass
chriseppstein
 
Sassy Styleguides
Sassy StyleguidesSassy Styleguides
Sassy Styleguides
Andy Richardson
 
Drupal 960 grid system based theming
Drupal 960 grid system based theming Drupal 960 grid system based theming
Drupal 960 grid system based theming
Gaurav Mishra
 
Refresh OKC
Refresh OKCRefresh OKC
Refresh OKC
Nathan Smith
 
The Architect's Clue Bucket
The Architect's Clue BucketThe Architect's Clue Bucket
The Architect's Clue Bucket
Ruth Malan
 
The World of Stylesheet Languages
The World of Stylesheet LanguagesThe World of Stylesheet Languages
The World of Stylesheet Languages
Andrea Tino
 
An Introduction to Object Oriented CSS
An Introduction to Object Oriented CSSAn Introduction to Object Oriented CSS
An Introduction to Object Oriented CSS
Nati Devalle
 
MERN Stack Training in Hyderabad - MERN Stack Training Course in Hyderabad.pptx
MERN Stack Training in Hyderabad - MERN Stack Training Course in Hyderabad.pptxMERN Stack Training in Hyderabad - MERN Stack Training Course in Hyderabad.pptx
MERN Stack Training in Hyderabad - MERN Stack Training Course in Hyderabad.pptx
eshwarvisualpath
 
Css framework
Css frameworkCss framework
Css framework
Olivier Besson
 
Css framework
Css frameworkCss framework
Css framework
Olivier Besson
 

Semelhante a Thoughtful architecture and good practices in CSS - myth or new realities (20)

slides-students-C04.pdf
slides-students-C04.pdfslides-students-C04.pdf
slides-students-C04.pdf
 
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
 
70 Expert Ideas For Better Css
70 Expert Ideas For Better Css70 Expert Ideas For Better Css
70 Expert Ideas For Better Css
 
Introducing PostCSS
Introducing PostCSSIntroducing PostCSS
Introducing PostCSS
 
CSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. ControlCSS vs. JavaScript - Trust vs. Control
CSS vs. JavaScript - Trust vs. Control
 
Is everything we used to do wrong?
Is everything we used to do wrong?Is everything we used to do wrong?
Is everything we used to do wrong?
 
Get Started With Tailwind React and Create Beautiful Apps.pdf
Get Started With Tailwind React and Create Beautiful Apps.pdfGet Started With Tailwind React and Create Beautiful Apps.pdf
Get Started With Tailwind React and Create Beautiful Apps.pdf
 
50 css tools and resources from 2014
50 css tools and resources from 201450 css tools and resources from 2014
50 css tools and resources from 2014
 
CSS Custom Properties (aka CSS Variable)
CSS Custom Properties (aka CSS Variable)CSS Custom Properties (aka CSS Variable)
CSS Custom Properties (aka CSS Variable)
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
 
Authoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & SassAuthoring Stylesheets with Compass & Sass
Authoring Stylesheets with Compass & Sass
 
Sassy Styleguides
Sassy StyleguidesSassy Styleguides
Sassy Styleguides
 
Drupal 960 grid system based theming
Drupal 960 grid system based theming Drupal 960 grid system based theming
Drupal 960 grid system based theming
 
Refresh OKC
Refresh OKCRefresh OKC
Refresh OKC
 
The Architect's Clue Bucket
The Architect's Clue BucketThe Architect's Clue Bucket
The Architect's Clue Bucket
 
The World of Stylesheet Languages
The World of Stylesheet LanguagesThe World of Stylesheet Languages
The World of Stylesheet Languages
 
An Introduction to Object Oriented CSS
An Introduction to Object Oriented CSSAn Introduction to Object Oriented CSS
An Introduction to Object Oriented CSS
 
MERN Stack Training in Hyderabad - MERN Stack Training Course in Hyderabad.pptx
MERN Stack Training in Hyderabad - MERN Stack Training Course in Hyderabad.pptxMERN Stack Training in Hyderabad - MERN Stack Training Course in Hyderabad.pptx
MERN Stack Training in Hyderabad - MERN Stack Training Course in Hyderabad.pptx
 
Css framework
Css frameworkCss framework
Css framework
 
Css framework
Css frameworkCss framework
Css framework
 

Último

Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussionArtificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
gpww3sf4
 
BRIC_2024_2024-06-06-11:30-haunschild_archival_version.pdf
BRIC_2024_2024-06-06-11:30-haunschild_archival_version.pdfBRIC_2024_2024-06-06-11:30-haunschild_archival_version.pdf
BRIC_2024_2024-06-06-11:30-haunschild_archival_version.pdf
Robin Haunschild
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
Frederic Leger
 
Using-Presentation-Software-to-the-Fullf.pptx
Using-Presentation-Software-to-the-Fullf.pptxUsing-Presentation-Software-to-the-Fullf.pptx
Using-Presentation-Software-to-the-Fullf.pptx
kainatfatyma9
 
ASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdfASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdf
ToshihiroIto4
 
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
OECD Directorate for Financial and Enterprise Affairs
 
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussionPro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
Disaster Management project for holidays homework and other uses
Disaster Management project for holidays homework and other usesDisaster Management project for holidays homework and other uses
Disaster Management project for holidays homework and other uses
RIDHIMAGARG21
 
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
OECD Directorate for Financial and Enterprise Affairs
 
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussionPro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
OECD Directorate for Financial and Enterprise Affairs
 
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij
 
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
 
The Intersection between Competition and Data Privacy – OECD – June 2024 OECD...
The Intersection between Competition and Data Privacy – OECD – June 2024 OECD...The Intersection between Competition and Data Privacy – OECD – June 2024 OECD...
The Intersection between Competition and Data Privacy – OECD – June 2024 OECD...
OECD Directorate for Financial and Enterprise Affairs
 
Why Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdf
Why Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdfWhy Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdf
Why Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdf
Ben Linders
 
XP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to LeadershipXP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to Leadership
samililja
 
IEEE CIS Webinar Sustainable futures.pdf
IEEE CIS Webinar Sustainable futures.pdfIEEE CIS Webinar Sustainable futures.pdf
IEEE CIS Webinar Sustainable futures.pdf
Claudio Gallicchio
 
The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...
The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...
The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...
OECD Directorate for Financial and Enterprise Affairs
 
The remarkable life of Sir Mokshagundam Visvesvaraya.pptx
The remarkable life of Sir Mokshagundam Visvesvaraya.pptxThe remarkable life of Sir Mokshagundam Visvesvaraya.pptx
The remarkable life of Sir Mokshagundam Visvesvaraya.pptx
JiteshKumarChoudhary2
 
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
OECD Directorate for Financial and Enterprise Affairs
 

Último (20)

Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussionArtificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
Artificial Intelligence, Data and Competition – LIM – June 2024 OECD discussion
 
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
原版制作贝德福特大学毕业证(bedfordhire毕业证)硕士文凭原版一模一样
 
BRIC_2024_2024-06-06-11:30-haunschild_archival_version.pdf
BRIC_2024_2024-06-06-11:30-haunschild_archival_version.pdfBRIC_2024_2024-06-06-11:30-haunschild_archival_version.pdf
BRIC_2024_2024-06-06-11:30-haunschild_archival_version.pdf
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
 
Using-Presentation-Software-to-the-Fullf.pptx
Using-Presentation-Software-to-the-Fullf.pptxUsing-Presentation-Software-to-the-Fullf.pptx
Using-Presentation-Software-to-the-Fullf.pptx
 
ASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdfASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdf
 
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
Artificial Intelligence, Data and Competition – ČORBA – June 2024 OECD discus...
 
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussionPro-competitive Industrial Policy – OECD – June 2024 OECD discussion
Pro-competitive Industrial Policy – OECD – June 2024 OECD discussion
 
Disaster Management project for holidays homework and other uses
Disaster Management project for holidays homework and other usesDisaster Management project for holidays homework and other uses
Disaster Management project for holidays homework and other uses
 
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
 
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussionPro-competitive Industrial Policy – LANE – June 2024 OECD discussion
Pro-competitive Industrial Policy – LANE – June 2024 OECD discussion
 
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
 
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
 
The Intersection between Competition and Data Privacy – OECD – June 2024 OECD...
The Intersection between Competition and Data Privacy – OECD – June 2024 OECD...The Intersection between Competition and Data Privacy – OECD – June 2024 OECD...
The Intersection between Competition and Data Privacy – OECD – June 2024 OECD...
 
Why Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdf
Why Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdfWhy Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdf
Why Psychological Safety Matters for Software Teams - ACE 2024 - Ben Linders.pdf
 
XP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to LeadershipXP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to Leadership
 
IEEE CIS Webinar Sustainable futures.pdf
IEEE CIS Webinar Sustainable futures.pdfIEEE CIS Webinar Sustainable futures.pdf
IEEE CIS Webinar Sustainable futures.pdf
 
The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...
The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...
The Intersection between Competition and Data Privacy – KEMP – June 2024 OECD...
 
The remarkable life of Sir Mokshagundam Visvesvaraya.pptx
The remarkable life of Sir Mokshagundam Visvesvaraya.pptxThe remarkable life of Sir Mokshagundam Visvesvaraya.pptx
The remarkable life of Sir Mokshagundam Visvesvaraya.pptx
 
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
 

Thoughtful architecture and good practices in CSS - myth or new realities

  • 1. THOUGHTFUL ARCHITECTURE AND GOOD PRACTICES IN CSS MYTH OR NEW REALITIES?
  • 2. Hello world! Senior Frontend Developer @ Boldare ● SCRUM and Agile programming enthusiast ● antiquity and space admirer ● Canada addict Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 3. Some Theory of CSS W3C: “CSS is the language for describing the presentation of Web pages, including colors, layout, and fonts. It allows one to adapt the presentation to different types of devices, such as large screens, small screens, or printers. CSS is independent of HTML and can be used with any XML-based markup language. (...) This is referred to as the separation of structure (or: content) from presentation.” CSS Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 4. Myth or reality? Cambridge Dictionary: ● “an ancient story or set of stories, especially explaining the early history of a group of people or about natural events and facts” ● “a commonly believed but false idea” MYTH Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 5. Myth or reality? Cambridge Dictionary: ● “an ancient story or set of stories, especially explaining the early history of a group of people or about natural events and facts” ● “a commonly believed but false idea” MYTH Example: It is impossible to only talk about CSS for 45 minutes ;) Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 6. Myth: CSS is always easy and simple CSS IS AWESOME Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 7. Myth: It is impossible to write modular and scalable CSS code What can we do? Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 8. Reality: methodologies METHODOLOGIES Cambridge Dictionary: “a system of ways of doing, teaching, or studying something” Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 9. OOCSS Reality: methodologies METHODOLOGIES Cambridge Dictionary: “a system of ways of doing, teaching, or studying something” Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 10. Reality: methodologies METHODOLOGIES Cambridge Dictionary: “a system of ways of doing, teaching, or studying something” SM ACSS OOCSS Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 11. Reality: methodologies METHODOLOGIES Cambridge Dictionary: “a system of ways of doing, teaching, or studying something” BEM OOCSS Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak SM ACSS
  • 12. Reality: methodologies METHODOLOGIES Cambridge Dictionary: “a system of ways of doing, teaching, or studying something” ACSS OOCSS BEM Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak SM ACSS
  • 13. Reality: methodologies METHODOLOGIES Cambridge Dictionary: “a system of ways of doing, teaching, or studying something” ITCSS OOCSS BEM ACSS Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak SM ACSS
  • 14. Reality: methodologies METHODOLOGIES Cambridge Dictionary: “a system of ways of doing, teaching, or studying something” CUBE CSS OOCSS BEM ACSS ITCSS Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak SM ACSS
  • 15. Reality: Objective Oriented CSS OOCSS ● modular and object-oriented CSS ● first, global classes, then more specialized ones ● separated styles for containers and content Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 16. Reality: Objective Oriented CSS OOCSS ● modular and object-oriented CSS ● first, global classes, then more specialized ones ● separated styles for containers and content Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 17. Reality: Scalable and Modular Architecture for CSS SMACSS ● styles are divided into 5 groups: - basic - layout (l- prefix) - modules - state (is- prefix) - subject Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 18. Reality: BEM BEM ● modular CSS code ● elements are divided into: - blocks (e.g. form) - elements (e.g. input) - modifiers (e.g. password input) Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 19. Reality: Atomic CSS ACSS ● content-independent and reusable CSS classes ● most often single-line, responsible for only one setting Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 20. Reality: Inverted Triangle CSS ITCSS ● CSS code is separated into several sections (layers) ● it uses 3 principles: - generic to explicit - low to high specificity - far-reaching to localized Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak https://www.creativebloq.com/web-design/manage-large-css-projects-itcss-101517528
  • 21. Myth: It is impossible to write modular and scalable CSS code WAIT… WHY NOT USE SOMETHING THAT WE ALREADY KNOW? Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 22. Myth: It is impossible to write modular and scalable CSS code DRY Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Don’t Repeat Yourself
  • 23. Myth: It is impossible to write modular and scalable CSS code YAGNI Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak You Ain’t Gonna Need It
  • 24. Myth: It is impossible to write modular and scalable CSS code KISS Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Keep It Simple, Silly
  • 25. Myth: It is impossible to write modular and scalable CSS code SCA Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Separation of concerns
  • 26. Myth: It is impossible to write modular and scalable CSS code SOLID Wikipedia: “In object-oriented programming, SOLID is a mnemonic acronym for five design principles intended to make software designs more understable, flexible and maintainable. The principles are a subset of many principles promoted by American software engineer and instructor Robert C. Martin, first introduced in his 2000 paper Design Principles and Design Patterns” Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 27. Myth: It is impossible to write modular and scalable CSS code SOLID SOLID is an acronym for the first five OOD principles: Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak D I ependency Inversion Principle nterface Segregation Principle L iskov Substitution Principle O pen closed Principle S ingle responsibility Principle
  • 28. Myth: It is impossible to write modular and scalable CSS code SOLID Robert C. Martin “Uncle Bob” American software engineer, instructor, author of many books on software engineering, founder of the Agile Manifesto Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 29. Myth: It is impossible to use Single Responsibility Principle in CSS SOLID SRP a class should only have one responsibility Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 30. Myth: It is impossible to use Open Closed Principle in CSS SOLID OCP a class should be open to extensions and closed to modifications Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 31. Myth/True: It is impossible to use Liskov Substitution Principle in CSS SOLID LSP a class that extends to another class should not change the behavior of the base class Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 32. Myth/True: It is impossible to use Interface Segregation Principle in CSS SOLID ISP many dedicated classes are better than one very general one Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 33. Myth/True: It is impossible to use Dependency Inversion Principle in CSS SOLID DIP changing the styles of the child classes should not affect the styles of the parent classes Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 34. Reality: CSS preprocessors PREPROCESSORS Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 35. Reality: CSS preprocessors NESTING Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 36. Reality: CSS preprocessors INHERITANCE Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 37. Reality: CSS preprocessors MIXINS Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 38. Reality: CSS preprocessors LOOPS Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 39. Reality: CSS frameworks FRAMEWORKS Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 40. Reality: CSS frameworks Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak FRAMEWORKS https://stateofcss.com
  • 41. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Reality: CSS Styleguides
  • 42. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak CSS Testing Emulators
  • 43. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak CSS Testing Syntax
  • 44. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak CSS Testing Regression
  • 45. Reality: design system DESIGN SYSTEM Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak “At FOWA 2013 in London, Mark Otto described a design system as “everything that makes up your product” Everything? Everything. From typography, layouts and grids, colors, icons, components and coding conventions, to voice and tone, style-guide and documentation, a design system is bringing all of these together in a way that allows your entire team to learn, build, and grow.” https://css-tricks.com/design-systems-building-future/
  • 46. Reality: design system DESIGN SYSTEM Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 47. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language?
  • 48. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? https://stateofcss.com
  • 49. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? DECLARATIVE / IMPERATIVE programming language?
  • 50. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? DECLARATIVE IMPERATIVE describes a detailed sequence of steps that leads to a solution (how to do it) - a sequence of commands to be executed by the computer - requesting some action to be performed - the result of the operation is stored for later operations - performing more complex expressions consisting of arithmetic operations and entire functions JavaScript, PHP
  • 51. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? DECLARATIVE IMPERATIVE describes the conditions that the final solution must meet (what we want to achieve) describes a detailed sequence of steps that lead to solution (how to do it) - independence (the end result doesn’t depend on any external condition) - statelessness (it has no internal state that is preserved between calls) - determinism (always gives the same result for the same input arguments) - a sequence of commands to be executed by the computer - requesting some action to be performed - the result of the operation is stored for later operations - performing more complex expressions consisting of arithmetic operations and entire functions CSS, HTML JavaScript, PHP
  • 52. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? DESCRIPTIVE PROGRAMMABLE - it only describes the data structures and the expected result - is most often not Turing complete or it achieves completeness in some other way - its declarative model of computation is Turing complete CSS, HTML, SQL Prolog
  • 53. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? BUT...
  • 54. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? CSS is gaining imperative features
  • 55. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? CSS is gaining imperative features FUNCTIONS
  • 56. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? CSS is gaining imperative features FUNCTIONS OPERATORS
  • 57. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? CSS is gaining imperative features FUNCTIONS OPERATORS MATH VARIABLES
  • 58. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? CSS is gaining imperative features FUNCTIONS OPERATORS MATH VARIABLES
  • 59. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? TURING MACHINE programming language?
  • 60. Is CSS a programming language? CSS Douglas Crockford JavaScript guru, American computer programmer and entrepreneur, writer and speaker on JavaScript Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 61. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? Wikipedia: “In computability theory, a system of data-manipulation rules (such as a computer's instruction set, a programming language, or a cellular automaton) is said to be Turing-complete or computationally universal if it can be used to simulate any Turing machine. This means that this system is able to recognize or decide other data-manipulation rule sets. Turing completeness is used as a way to express the power of such a data-manipulation rule set. (...) To show that something is Turing-complete, it is enough to show that it can be used to simulate some Turing-complete system. For example, an imperative language is Turing-complete if it has conditional branching (e.g., "if" and "goto" statements, or a "branch if zero" instruction; see one-instruction set computer) and the ability to change an arbitrary amount of memory (e.g., the ability to maintain an arbitrary number of data items). Of course, no physical system can have infinite memory; but if the limitation of finite memory is ignored, most programming languages are otherwise Turing-complete.
  • 62. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? Rule 110 cellular automaton Wikipedia: In an elementary cellular automaton, a one-dimensional pattern of 0s and 1s evolves according to a simple set of rules. Whether a point in the pattern will be 0 or 1 in the new generation depends on its current value, as well as on those of its two neighbors. Set of rules: Current pattern 111 110 101 100 011 010 001 000 New state for center cell 0 1 1 0 1 1 1 0
  • 63. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? https://jsfiddle.net/Camilo/eQyBa/ Rule 110 cellular automaton
  • 64. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? CSS is NOT Turing complete
  • 65. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? CSS + HTML is Turing complete
  • 66. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? CSS + HTML is Turing complete
  • 67. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? CSS + HTML + USER INTERACTION is Turing complete
  • 68. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? DOMAIN - SPECIFIC / GENERAL - PURPOSE programming language?
  • 69. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? DOMAIN - SPECIFIC GENERAL - PURPOSE a programming language that is widely used across all application domains and has no special functionality for a particular domain JavaScript, PHP
  • 70. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? DOMAIN - SPECIFIC GENERAL - PURPOSE a programming language adapted to solve a specific problem area, a specific representation of a problem or a specific technique for solving them a programming language that is widely used across all application domains and has no special functionality for a particular domain HTML, CSS JavaScript, PHP
  • 71. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? CONTEXTUAL programming language?
  • 72. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? Wikipedia: “In computer science, a task context is the minimal set of data used by a task (which may be a process, thread, or fiber) that must be saved to allow a task to be interrupted, and later continued from the same point.
  • 73. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? COMPLEX programming language?
  • 74. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? FLEXIBILITY DEMANDING DISCIPLINE BROWSER COMPATIBILITY RESILIENCE
  • 75. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? FLEXIBILITY DEMANDING DISCIPLINE RESILIENCE
  • 76. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? FLEXIBILITY DEMANDING DISCIPLINE BROWSER COMPATIBILITY RESILIENCE
  • 77. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? FLEXIBILITY DEMANDING DISCIPLINE BROWSER COMPATIBILITY RESILIENCE
  • 78. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? EASY TO LEARN language?
  • 79. Reality: low entry threshold for CSS Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak https://stateofcss.com
  • 80. Reality: CSS roadmap 2021 Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Preprocessors Frameworks Methodologies Styled Component CSS Module CSS-in-JS
  • 81. Reality: CSS can be complicated Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak https://codepen.io/ivorjetski/details/xMJoYO
  • 82. Reality: CSS can be complicated Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak https://codepen.io/_fbrz/pen/whxbF
  • 83. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? LOWER EFFORT language?
  • 84. Is CSS a programming language? Adam Argyle Chrome CSS Developer Advocate at Google, UI + UX Specialized Full Stack Web App Engineer Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 85. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? TO SUM IT UP...
  • 86. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? CSS is a WORTHY language!
  • 87. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak Is CSS a programming language? Chris Coyier web designer and developer, CSS-TRICKS creator, CodePen co-founder, writer and speaker
  • 88. Is CSS a programming language? CSS Lea Verou software developer, speaker and author, Invited Expert in the W3C CSS Working Group, W3C Technical Architecture Group (TAG) member Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak
  • 89. Thoughtful architecture and good practices in CSS - myth or new realities? Anna Matysiak We are all developers :)