SlideShare a Scribd company logo
inarocket.com
Learn at rocket speed
SUITCSS NAMING CONVENTION
Learn front-end development at rocket speed
inarocket.com
by miguelsanchez.com
in a
ROCKET
SUIT FUNDAMENTALS
Understanding SUIT in just 2 minutes
A BEM-based naming convention that helps to scope component
CSS and make your widgets render more predictably.
LEARN SUIT: CSS naming conventions
+COMPONENTS UTILITIES
Developed by Nicholas Gallagher.
SUIT
SUIT comprises:
LEARN SUIT: CSS naming conventions
+COMPONENTS UTILITIES
SUIT
Within components there can be Modifiers, Descendants and States.
A BEM-based naming convention that helps to scope component
CSS and make your widgets render more predictably.
SUIT comprises:
LEARN SUIT: CSS naming conventions
COMPONENT
LEARN SUIT: CSS naming conventions
COMPONENT COMPONENT
DESCENDENT
DESCENDENT
DESCENDENT
DESCENDENT
A component descendent is a class that is attached to a descendent node of a component.
It's responsible for applying presentation directly to the descendent on behalf of a particular
component.
LEARN SUIT: CSS naming conventions
COMPONENT COMPONENT
DESCENDENT
DESCENDENT
DESCENDENT
DESCENDENT
COMPONENT+ MODIFIER
DESCENDENT
DESCENDENT
DESCENDENT
DESCENDENT
A component modifier is a class that modifies the presentation of the base component in
some form.
LEARN SUIT: CSS naming conventions
COMPONENT COMPONENT
DESCENDENT
DESCENDENT
DESCENDENT
DESCENDENT
COMPONENT+ MODIFIER
DESCENDENT
DESCENDENT
DESCENDENT
DESCENDENT
COMPONENT+ STATE
DESCENDENT
DESCENDENT
DESCENDENT
DESCENDENT
Use is-stateName to reflect changes to a component's state. Never style these classes
directly; they should always be used as an adjoining class.
LEARN SUIT: CSS naming conventions
COMPONENT COMPONENT
DESCENDENT
DESCENDENT
DESCENDENT
DESCENDENT
COMPONENT+ MODIFIER
DESCENDENT
DESCENDENT
DESCENDENT
DESCENDENT
COMPONENT
DESCENDENT
DESCENDENT
DESCENDENT
DESCENDENT
+ STATE
Use is-stateName to reflect changes to a component's state. Never style these classes
directly; they should always be used as an adjoining class.
LEARN SUIT: CSS naming conventions
+COMPONENTS UTILITIES
SUIT
Utility classes map to fixed, low-level, structural and positional traits.
A BEM-based naming convention that helps to scope component
CSS and make your widgets render more predictably.
SUIT comprises:
LEARN SUIT: CSS naming conventions
Certain CSS properties and patterns are used frequently.
For example: floats, containing floats, vertical alignment, text truncation.
Utilities:
β€’ can help to reduce repetition and provide
consistent implementations.
β€’ can be added to any element; multiple utilities
can be used together; and utilities can be
used alongside component classes.
example.css
<div class="Tweet u-cf">
<a class="u-sizeFit" href="{{url}}">
<img class="u-block" src="{{src}}" alt="">
</a>
<p class="Tweet-text u-sizeFill u-textBreak">
…
</p>
</div>
UTILITIES
Utilities are grouped by type. The names of utilities with similar concerns
usually start with a common string, e.g., u-textCenter, u-textTruncate; u-
linkClean, u-linkBlock.
SOURCE: SUIT CSS - Utilities.
in a
ROCKET
QUICK EXAMPLE
How it works with a real example
LEARN SUIT: CSS naming conventions
$150 SUBSCRIBE NOW
LEARN SUIT: CSS naming conventions
COMPONENT: MyBtn
LEARN SUIT: CSS naming conventions
COMPONENT: MyBtn COMPONENT
$150 SUBSCRIBE NOW
DESCENDENT: price DESCENDENT: text
LEARN SUIT: CSS naming conventions
COMPONENT: MyBtn COMPONENT
$150 SUBSCRIBE NOW
DESCENDENT: price DESCENDENT: text
COMPONENT + MODIFIER: important
$150 SUBSCRIBE NOW
LEARN SUIT: CSS naming conventions
COMPONENT: MyBtn COMPONENT
$150 SUBSCRIBE NOW
DESCENDENT: price DESCENDENT: text
COMPONENT + MODIFIER: important
$150 SUBSCRIBE NOW $150 SUBSCRIBE NOW
COMPONENT + STATE: is-active
LEARN SUIT: CSS naming conventions
COMPONENT: MyBtn COMPONENT
$150 SUBSCRIBE NOW
DESCENDENT: price DESCENDENT: text
COMPONENT + MODIFIER: important
$150 SUBSCRIBE NOW
COMPONENT
$150 SUBSCRIBE NOW
DESCENDENT + STATE: is-active
in a
ROCKET
LET'S CODE
SUIT syntax you can start using right now
SUIT SYNTAX
LEARN SUIT: CSS naming conventions
.ComponentName
Must be written in pascal case.
Examples: .MyBtn or .LoginForm
COMPONENTS
SUIT SYNTAX
LEARN SUIT: CSS naming conventions
.ComponentName
Must be written in pascal case.
Examples: .MyBtn or .LoginForm
.ComponentName-descendentName
Must be written in camel case.
Examples: .MyBtn-priceBox or .MyBtn-textBox
$150 SUBSCRIBE NOW
COMPONENTS
DESCENDENTS
SUIT SYNTAX
$150 SUBSCRIBE NOW
LEARN SUIT: CSS naming conventions
.ComponentName
Must be written in pascal case.
Examples: .MyBtn or .LoginForm
.ComponentName-descendentName
Must be written in camel case.
Examples: .MyBtn-priceBox or .MyBtn-textBox
$150 SUBSCRIBE NOW
COMPONENTS
DESCENDENTS
MODIFIERS
.ComponentName--modifierName
Must be written in camel case.
Examples: .MyBtn--important
SUIT SYNTAX: HOW TO REMEMBER ITS RULES
LEARN SUIT: CSS naming conventions
I know it seems ridiculous, but mnemonics work with this things ;)
PascaL firstCamel secondCamel
SUIT SYNTAX: HOW TO REMEMBER ITS RULES
LEARN SUIT: CSS naming conventions
I know it seems ridiculous, but mnemonics work with this things ;)
PascaL
ComponentName
Must be written in pascal case.
SUIT SYNTAX: HOW TO REMEMBER ITS RULES
LEARN SUIT: CSS naming conventions
I know it seems ridiculous, but mnemonics work with this things ;)
PascaL firstCamel
ComponentName -descendentName
Must be written in camel case.Must be written in pascal case.
SUIT SYNTAX: HOW TO REMEMBER ITS RULES
LEARN SUIT: CSS naming conventions
I know it seems ridiculous, but mnemonics work with this things ;)
PascaL firstCamel secondCamel
ComponentName -descendentName --modifierName
Must be written in camel case. Must be written in camel case.Must be written in pascal case.
LEARN SUIT: CSS naming conventions
COMPONENT: MyBtn
styles.css
/* Component */
.MyBtn { styles here }
CSS
index.html
<a href="#" class="MyBtn"></a>
HTML
LEARN SUIT: CSS naming conventions
COMPONENT: MyBtn
$150 SUBSCRIBE NOW
DESCENDENT: price DESCENDENT: text
styles.css
/* Component */
.MyBtn { styles here }
/* Descendents: depend upon the component */
.MyBtn-price { styles here }
.MyBtn-text { styles here }
CSS
index.html
<a href="#" class="MyBtn">
<span class="MyBtn-price">$150</span>
<span class="MyBtn-text">Subscribe now</span>
</a>
HTML
LEARN SUIT: CSS naming conventions
COMPONENT: MyBtn
$150 SUBSCRIBE NOW
styles.css
/* Component */
.MyBtn { styles here }
/* Descendents: depend upon the component */
.MyBtn-price { styles here }
.MyBtn-text { styles here }
/* Modifier: change style of the component */
.MyBtn--important { styles here }
CSS
index.html
<a href="#" class="MyBtn MyBtn--important">
<span class="MyBtn-price">$150</span>
<span class="MyBtn-text">Subscribe now</span>
</a>
HTML
LEARN SUIT: CSS naming conventions
COMPONENT: MyBtn
$150 SUBSCRIBE NOW
styles.css
/* Component */
.MyBtn { styles here }
/* Descendents: depend upon the component */
.MyBtn-price { styles here }
.MyBtn-text { styles here }
/* Modifier: change style of the component */
.MyBtn-text--important { styles here }
CSS
index.html
<a href="subscribe.html" class="MyBtn">
<span class="MyBtn-price">$150</span>
<span class="MyBtn-text MyBtn-text--important">Subscribe
now</span>
</a>
HTML
USEFUL REFERENCES
LEARN SUIT: CSS naming conventions
SUIT CSS: NAMING CONVENTIONS
SUIT CSS relies on structured class names and meaningful hyphens.
github.com/suitcss/suit/blob/master/doc/naming-conventions.md
SUIT CSS: STYLE TOOLS FOR UI COMPONENTS
SUIT CSS is a reliable and testable styling methodology for component-based UI
development.
suitcss.github.io
Are you also interested in learning
BOOTSTRAP 4
POSTCSS?
+
http://inarocket.teachable.com/courses/css-postcss
Please visit:
Learn front-end development at rocket speed
inarocket.com
by miguelsanchez.com
inarocket.com
Learn at rocket speed
SUITCSS NAMING CONVENTION

More Related Content

PPTX
Bliblidotcom - Reintroduction BEM CSS
PDF
BEM - CSS, Seriously
PDF
BEM it! Introduction to BEM
PDF
Learn BEM: CSS Naming Convention
PPTX
IR용 μ‚¬μ—…κ³„νšμ„œ μž‘μ„±λ°©λ²• - How to describe your business
PPT
Testes de usabilidade - Webdesign 2022
PPTX
SSR with React - Connecting Next.js with WordPress
PDF
[FOSS4G Korea 2021]Workshop-QGIS-TIPS-20211028
Bliblidotcom - Reintroduction BEM CSS
BEM - CSS, Seriously
BEM it! Introduction to BEM
Learn BEM: CSS Naming Convention
IR용 μ‚¬μ—…κ³„νšμ„œ μž‘μ„±λ°©λ²• - How to describe your business
Testes de usabilidade - Webdesign 2022
SSR with React - Connecting Next.js with WordPress
[FOSS4G Korea 2021]Workshop-QGIS-TIPS-20211028

What's hot (20)

PDF
letswift22_κΆŒμ€λΉˆ_λΉ„μ „κ³΅μž 개발자둜 살아남기.pdf
PDF
Tailwind CSS - KanpurJS
PDF
Slides: NoSQL Data Modeling Using JSON Documents – A Practical Approach
PDF
NextJS, A JavaScript Framework for building next generation SPA
PPT
LDAP Presentation
DOC
Resume-UI developer
PDF
One step in the future: CSS variables
PDF
Gephi: Exploratory networks analysis software
PDF
Building modern data lakes
Β 
PPTX
PDF
ν΄λΌμš°λ“œ λ„€μ΄ν‹°λΈŒ μ „ν™˜ μš”μ†Œ 및 성곡적인 μΏ λ²„λ„€ν‹°μŠ€ λ„μž… μ „λž΅
PPTX
AWS Elastic Beanstalk
PDF
Common MongoDB Use Cases
PDF
IMMERSE 2016 Introducing content fragments
PPT
Banco de Dados - NoSQL
PPTX
Integration patterns in AEM 6
PPTX
CΓ³mo empezar con Amazon EKS
PDF
Spark Summit EU talk by Dean Wampler
PPTX
Introduction to Tailwind CSS - IM Tech Meetup - May 2022.pptx
PPTX
Apache hive
letswift22_κΆŒμ€λΉˆ_λΉ„μ „κ³΅μž 개발자둜 살아남기.pdf
Tailwind CSS - KanpurJS
Slides: NoSQL Data Modeling Using JSON Documents – A Practical Approach
NextJS, A JavaScript Framework for building next generation SPA
LDAP Presentation
Resume-UI developer
One step in the future: CSS variables
Gephi: Exploratory networks analysis software
Building modern data lakes
Β 
ν΄λΌμš°λ“œ λ„€μ΄ν‹°λΈŒ μ „ν™˜ μš”μ†Œ 및 성곡적인 μΏ λ²„λ„€ν‹°μŠ€ λ„μž… μ „λž΅
AWS Elastic Beanstalk
Common MongoDB Use Cases
IMMERSE 2016 Introducing content fragments
Banco de Dados - NoSQL
Integration patterns in AEM 6
CΓ³mo empezar con Amazon EKS
Spark Summit EU talk by Dean Wampler
Introduction to Tailwind CSS - IM Tech Meetup - May 2022.pptx
Apache hive
Ad

Similar to Learn SUIT: CSS Naming Convention (20)

PDF
OOCSS, SMACSS or BEM?
PDF
OOCSS, SMACSS or BEM, what is the question...
PDF
Creative Web 02 - HTML & CSS Basics
PDF
Front-End Methodologies
PPT
Css best practices style guide and tips
PPT
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
PDF
Sane CSS - A modern approach to CSS
PPT
Css training tutorial css3 &amp; css4 essentials
PDF
css-tutorial
PDF
css-tutorial
PDF
Web technology unit II
PPT
css-presentation.ppt
PDF
Css tutorial
PDF
Css - Tutorial
ODP
HTML5, CSS, JavaScript Style guide and coding conventions
PDF
Css tutorial by [email protected]
PDF
Css tutorial
PDF
Css tutorial
PDF
Css tutorial
PDF
Css masterclass book
OOCSS, SMACSS or BEM?
OOCSS, SMACSS or BEM, what is the question...
Creative Web 02 - HTML & CSS Basics
Front-End Methodologies
Css best practices style guide and tips
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
Sane CSS - A modern approach to CSS
Css training tutorial css3 &amp; css4 essentials
css-tutorial
css-tutorial
Web technology unit II
css-presentation.ppt
Css tutorial
Css - Tutorial
HTML5, CSS, JavaScript Style guide and coding conventions
Css tutorial by [email protected]
Css tutorial
Css tutorial
Css tutorial
Css masterclass book
Ad

More from In a Rocket (15)

PDF
3- Learn Flexbox & CSS Grid / Container & items
PDF
2- Learn Flexbox & CSS Grid / Context
PDF
1- Learn Flexbox & CSS Grid / Environment setup
PDF
17- Learn CSS Fundamentals / Units
PDF
16- Learn CSS Fundamentals / Background
PDF
15- Learn CSS Fundamentals / Color
PDF
14- Learn CSS Fundamentals / Inheritance
PDF
13- Learn CSS Fundamentals / Specificity
PDF
12- Learn CSS Fundamentals / Mix & group
PDF
11- Learn CSS Fundamentals / Combinators
PDF
10- Learn CSS Fundamentals / Pseudo-elements
PDF
9- Learn CSS Fundamentals / Pseudo-classes
PDF
8- Learn CSS Fundamentals / Attribute selectors
PDF
2- Learn HTML Fundamentals / Text Formatting
PDF
1- Learn HTML Fundamentals / Start in 5 Minutes
3- Learn Flexbox & CSS Grid / Container & items
2- Learn Flexbox & CSS Grid / Context
1- Learn Flexbox & CSS Grid / Environment setup
17- Learn CSS Fundamentals / Units
16- Learn CSS Fundamentals / Background
15- Learn CSS Fundamentals / Color
14- Learn CSS Fundamentals / Inheritance
13- Learn CSS Fundamentals / Specificity
12- Learn CSS Fundamentals / Mix & group
11- Learn CSS Fundamentals / Combinators
10- Learn CSS Fundamentals / Pseudo-elements
9- Learn CSS Fundamentals / Pseudo-classes
8- Learn CSS Fundamentals / Attribute selectors
2- Learn HTML Fundamentals / Text Formatting
1- Learn HTML Fundamentals / Start in 5 Minutes

Recently uploaded (20)

PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PPTX
artificial intelligence overview of it and more
DOCX
Unit-3 cyber security network security of internet system
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PPT
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
SAP Ariba Sourcing PPT for learning material
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
Introduction to Information and Communication Technology
PDF
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
PPTX
Mathew Digital SEO Checklist Guidlines 2025
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
artificial intelligence overview of it and more
Unit-3 cyber security network security of internet system
522797556-Unit-2-Temperature-measurement-1-1.pptx
introduction about ICD -10 & ICD-11 ppt.pptx
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
SASE Traffic Flow - ZTNA Connector-1.pdf
SAP Ariba Sourcing PPT for learning material
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
Job_Card_System_Styled_lorem_ipsum_.pptx
Tenda Login Guide: Access Your Router in 5 Easy Steps
Introduction to Information and Communication Technology
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
Mathew Digital SEO Checklist Guidlines 2025
Slides PPTX World Game (s) Eco Economic Epochs.pptx
Decoding a Decade: 10 Years of Applied CTI Discipline
Introuction about ICD -10 and ICD-11 PPT.pptx
An introduction to the IFRS (ISSB) Stndards.pdf
The New Creative Director: How AI Tools for Social Media Content Creation Are...

Learn SUIT: CSS Naming Convention

  • 1. inarocket.com Learn at rocket speed SUITCSS NAMING CONVENTION
  • 2. Learn front-end development at rocket speed inarocket.com by miguelsanchez.com
  • 4. A BEM-based naming convention that helps to scope component CSS and make your widgets render more predictably. LEARN SUIT: CSS naming conventions +COMPONENTS UTILITIES Developed by Nicholas Gallagher. SUIT SUIT comprises:
  • 5. LEARN SUIT: CSS naming conventions +COMPONENTS UTILITIES SUIT Within components there can be Modifiers, Descendants and States. A BEM-based naming convention that helps to scope component CSS and make your widgets render more predictably. SUIT comprises:
  • 6. LEARN SUIT: CSS naming conventions COMPONENT
  • 7. LEARN SUIT: CSS naming conventions COMPONENT COMPONENT DESCENDENT DESCENDENT DESCENDENT DESCENDENT A component descendent is a class that is attached to a descendent node of a component. It's responsible for applying presentation directly to the descendent on behalf of a particular component.
  • 8. LEARN SUIT: CSS naming conventions COMPONENT COMPONENT DESCENDENT DESCENDENT DESCENDENT DESCENDENT COMPONENT+ MODIFIER DESCENDENT DESCENDENT DESCENDENT DESCENDENT A component modifier is a class that modifies the presentation of the base component in some form.
  • 9. LEARN SUIT: CSS naming conventions COMPONENT COMPONENT DESCENDENT DESCENDENT DESCENDENT DESCENDENT COMPONENT+ MODIFIER DESCENDENT DESCENDENT DESCENDENT DESCENDENT COMPONENT+ STATE DESCENDENT DESCENDENT DESCENDENT DESCENDENT Use is-stateName to reflect changes to a component's state. Never style these classes directly; they should always be used as an adjoining class.
  • 10. LEARN SUIT: CSS naming conventions COMPONENT COMPONENT DESCENDENT DESCENDENT DESCENDENT DESCENDENT COMPONENT+ MODIFIER DESCENDENT DESCENDENT DESCENDENT DESCENDENT COMPONENT DESCENDENT DESCENDENT DESCENDENT DESCENDENT + STATE Use is-stateName to reflect changes to a component's state. Never style these classes directly; they should always be used as an adjoining class.
  • 11. LEARN SUIT: CSS naming conventions +COMPONENTS UTILITIES SUIT Utility classes map to fixed, low-level, structural and positional traits. A BEM-based naming convention that helps to scope component CSS and make your widgets render more predictably. SUIT comprises:
  • 12. LEARN SUIT: CSS naming conventions Certain CSS properties and patterns are used frequently. For example: floats, containing floats, vertical alignment, text truncation. Utilities: β€’ can help to reduce repetition and provide consistent implementations. β€’ can be added to any element; multiple utilities can be used together; and utilities can be used alongside component classes. example.css <div class="Tweet u-cf"> <a class="u-sizeFit" href="{{url}}"> <img class="u-block" src="{{src}}" alt=""> </a> <p class="Tweet-text u-sizeFill u-textBreak"> … </p> </div> UTILITIES Utilities are grouped by type. The names of utilities with similar concerns usually start with a common string, e.g., u-textCenter, u-textTruncate; u- linkClean, u-linkBlock. SOURCE: SUIT CSS - Utilities.
  • 13. in a ROCKET QUICK EXAMPLE How it works with a real example
  • 14. LEARN SUIT: CSS naming conventions $150 SUBSCRIBE NOW
  • 15. LEARN SUIT: CSS naming conventions COMPONENT: MyBtn
  • 16. LEARN SUIT: CSS naming conventions COMPONENT: MyBtn COMPONENT $150 SUBSCRIBE NOW DESCENDENT: price DESCENDENT: text
  • 17. LEARN SUIT: CSS naming conventions COMPONENT: MyBtn COMPONENT $150 SUBSCRIBE NOW DESCENDENT: price DESCENDENT: text COMPONENT + MODIFIER: important $150 SUBSCRIBE NOW
  • 18. LEARN SUIT: CSS naming conventions COMPONENT: MyBtn COMPONENT $150 SUBSCRIBE NOW DESCENDENT: price DESCENDENT: text COMPONENT + MODIFIER: important $150 SUBSCRIBE NOW $150 SUBSCRIBE NOW COMPONENT + STATE: is-active
  • 19. LEARN SUIT: CSS naming conventions COMPONENT: MyBtn COMPONENT $150 SUBSCRIBE NOW DESCENDENT: price DESCENDENT: text COMPONENT + MODIFIER: important $150 SUBSCRIBE NOW COMPONENT $150 SUBSCRIBE NOW DESCENDENT + STATE: is-active
  • 20. in a ROCKET LET'S CODE SUIT syntax you can start using right now
  • 21. SUIT SYNTAX LEARN SUIT: CSS naming conventions .ComponentName Must be written in pascal case. Examples: .MyBtn or .LoginForm COMPONENTS
  • 22. SUIT SYNTAX LEARN SUIT: CSS naming conventions .ComponentName Must be written in pascal case. Examples: .MyBtn or .LoginForm .ComponentName-descendentName Must be written in camel case. Examples: .MyBtn-priceBox or .MyBtn-textBox $150 SUBSCRIBE NOW COMPONENTS DESCENDENTS
  • 23. SUIT SYNTAX $150 SUBSCRIBE NOW LEARN SUIT: CSS naming conventions .ComponentName Must be written in pascal case. Examples: .MyBtn or .LoginForm .ComponentName-descendentName Must be written in camel case. Examples: .MyBtn-priceBox or .MyBtn-textBox $150 SUBSCRIBE NOW COMPONENTS DESCENDENTS MODIFIERS .ComponentName--modifierName Must be written in camel case. Examples: .MyBtn--important
  • 24. SUIT SYNTAX: HOW TO REMEMBER ITS RULES LEARN SUIT: CSS naming conventions I know it seems ridiculous, but mnemonics work with this things ;) PascaL firstCamel secondCamel
  • 25. SUIT SYNTAX: HOW TO REMEMBER ITS RULES LEARN SUIT: CSS naming conventions I know it seems ridiculous, but mnemonics work with this things ;) PascaL ComponentName Must be written in pascal case.
  • 26. SUIT SYNTAX: HOW TO REMEMBER ITS RULES LEARN SUIT: CSS naming conventions I know it seems ridiculous, but mnemonics work with this things ;) PascaL firstCamel ComponentName -descendentName Must be written in camel case.Must be written in pascal case.
  • 27. SUIT SYNTAX: HOW TO REMEMBER ITS RULES LEARN SUIT: CSS naming conventions I know it seems ridiculous, but mnemonics work with this things ;) PascaL firstCamel secondCamel ComponentName -descendentName --modifierName Must be written in camel case. Must be written in camel case.Must be written in pascal case.
  • 28. LEARN SUIT: CSS naming conventions COMPONENT: MyBtn styles.css /* Component */ .MyBtn { styles here } CSS index.html <a href="#" class="MyBtn"></a> HTML
  • 29. LEARN SUIT: CSS naming conventions COMPONENT: MyBtn $150 SUBSCRIBE NOW DESCENDENT: price DESCENDENT: text styles.css /* Component */ .MyBtn { styles here } /* Descendents: depend upon the component */ .MyBtn-price { styles here } .MyBtn-text { styles here } CSS index.html <a href="#" class="MyBtn"> <span class="MyBtn-price">$150</span> <span class="MyBtn-text">Subscribe now</span> </a> HTML
  • 30. LEARN SUIT: CSS naming conventions COMPONENT: MyBtn $150 SUBSCRIBE NOW styles.css /* Component */ .MyBtn { styles here } /* Descendents: depend upon the component */ .MyBtn-price { styles here } .MyBtn-text { styles here } /* Modifier: change style of the component */ .MyBtn--important { styles here } CSS index.html <a href="#" class="MyBtn MyBtn--important"> <span class="MyBtn-price">$150</span> <span class="MyBtn-text">Subscribe now</span> </a> HTML
  • 31. LEARN SUIT: CSS naming conventions COMPONENT: MyBtn $150 SUBSCRIBE NOW styles.css /* Component */ .MyBtn { styles here } /* Descendents: depend upon the component */ .MyBtn-price { styles here } .MyBtn-text { styles here } /* Modifier: change style of the component */ .MyBtn-text--important { styles here } CSS index.html <a href="subscribe.html" class="MyBtn"> <span class="MyBtn-price">$150</span> <span class="MyBtn-text MyBtn-text--important">Subscribe now</span> </a> HTML
  • 32. USEFUL REFERENCES LEARN SUIT: CSS naming conventions SUIT CSS: NAMING CONVENTIONS SUIT CSS relies on structured class names and meaningful hyphens. github.com/suitcss/suit/blob/master/doc/naming-conventions.md SUIT CSS: STYLE TOOLS FOR UI COMPONENTS SUIT CSS is a reliable and testable styling methodology for component-based UI development. suitcss.github.io
  • 33. Are you also interested in learning BOOTSTRAP 4 POSTCSS? + http://inarocket.teachable.com/courses/css-postcss Please visit:
  • 34. Learn front-end development at rocket speed inarocket.com by miguelsanchez.com
  • 35. inarocket.com Learn at rocket speed SUITCSS NAMING CONVENTION