Learn BEM: CSS Naming Convention

Internet

in-a-rocket
The present document can't read!
Please download to view
27
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Description
Text
  • inarocket.com Learn at rocket speed BEM CSS NAMING CONVENTION
  • Learn front-end development at rocket speed inarocket.com by miguelsanchez.com http://www.inarocket.com http://miguelsanchez.com
  • in a ROCKET BEM FUNDAMENTALS Understanding BEM in just 2 minutes
  • LEARN BEM: Block - Element - Modifier B E M Is a naming convention for classes in HTML and CSS Developed by the team at Yandex. Block Element Modifier
  • LEARN BEM: Block - Element - Modifier B E M BLOCK: Encapsulates a standalone entity that is meaningful on its own. While blocks can be nested and interact with each other, semantically they remain equal; there is no precedence or hierarchy.
  • LEARN BEM: Block - Element - Modifier BLOCK
  • LEARN BEM: Block - Element - Modifier B E M ELEMENT: Parts of a block and have no standalone meaning. Any element is semantically tied to its block.
  • LEARN BEM: Block - Element - Modifier BLOCK BLOCK ELEMENT ELEMENT ELEMENT ELEMENT
  • LEARN BEM: Block - Element - Modifier B E M MODIFIER: Flags on blocks or elements. Use them to change appearance, behavior or state.
  • LEARN BEM: Block - Element - Modifier BLOCK BLOCK ELEMENT ELEMENT ELEMENT ELEMENT BLOCK + MODIFIER ELEMENT ELEMENT ELEMENT ELEMENT
  • LEARN BEM: Block - Element - Modifier BLOCK BLOCK ELEMENT ELEMENT ELEMENT ELEMENT BLOCK + MODIFIER ELEMENT ELEMENT ELEMENT ELEMENT BLOCK ELEMENT ELEMENT ELEMENT ELEMENT + MODIFIER
  • in a ROCKET QUICK EXAMPLE How it works with a real example
  • LEARN BEM: Block - Element - Modifier $150 SUBSCRIBE NOW
  • LEARN BEM: Block - Element - Modifier BLOCK: btn
  • LEARN BEM: Block - Element - Modifier BLOCK: btn BLOCK: btn $150 SUBSCRIBE NOW ELEMENT: price ELEMENT: text
  • LEARN BEM: Block - Element - Modifier BLOCK: btn BLOCK: btn $150 SUBSCRIBE NOW ELEMENT: price ELEMENT: text BLOCK: btn + MODIFIER $150 SUBSCRIBE NOW
  • LEARN BEM: Block - Element - Modifier BLOCK: btn BLOCK: btn $150 SUBSCRIBE NOW ELEMENT: price ELEMENT: text BLOCK: btn + MODIFIER $150 SUBSCRIBE NOW BLOCK: btn $150 SUBSCRIBE NOW ELEMENT + MODIFIER
  • in a ROCKET LET'S CODE BEM syntax you can start using right now
  • BEM SYNTAX $150 SUBSCRIBE NOW LEARN BEM: Block - Element - Modifier .block Examples: .btn or .login-form .block__element Examples: .btn__price or .btn__text .block--modifier 
 Examples: .btn--important 
 .block__element--modifier Examples: .btn__text--important $150 SUBSCRIBE NOW BLOCKS ELEMENTS MODIFIERS
  • LEARN BEM: Block - Element - Modifier BLOCK: btn styles.css /* Block */ .btn { styles here } CSS index.html HTML
  • LEARN BEM: Block - Element - Modifier BLOCK: btn $150 SUBSCRIBE NOW ELEMENT: price ELEMENT: text styles.css /* Block */ .btn { styles here } /* Elements: depend upon the block */ .btn__price { styles here } .btn__text { styles here } CSS index.html $150 Subscribe now HTML
  • LEARN BEM: Block - Element - Modifier BLOCK: btn $150 SUBSCRIBE NOW styles.css /* Block */ .btn { styles here } /* Elements: depend upon the block */ .btn__price { styles here } .btn__text { styles here } /* Modifier: change the style of the block */ .btn--important { styles here } CSS index.html $150 Subscribe now HTML
  • LEARN BEM: Block - Element - Modifier BLOCK: btn $150 SUBSCRIBE NOW styles.css /* Block */ .btn { styles here } /* Elements: depend upon the block */ .btn__price { styles here } .btn__text { styles here } /* Modifier: change the style of the element */ .btn__text--important { styles here } CSS index.html $150 Subscribe now HTML
  • USEFUL REFERENCES LEARN BEM: Block - Element - Modifier BEM METHODOLOGY: NAMING CONVENTION The BEM methodology provides an idea for creating naming rules and implements that idea in its canonical CSS selector naming convention. bem.info/methodology/naming-convention CONVENTION BY HARRY ROBERTS "BEM-like" convention of CSS Guidelines by Harry Roberts. bem.info/toolbox/sdk/bem-naming/#convention-by-harry-roberts https://en.bem.info/methodology/naming-convention/ https://en.bem.info/toolbox/sdk/bem-naming/#convention-by-harry-roberts
  • Are you also interested in learning BOOTSTRAP 4 POSTCSS? + http://inarocket.teachable.com/courses/css-postcss Please visit: http://inarocket.teachable.com/courses/css-postcss http://inarocket.teachable.com/courses/css-postcss
  • Learn front-end development at rocket speed inarocket.com by miguelsanchez.com http://www.inarocket.com http://miguelsanchez.com
  • inarocket.com Learn at rocket speed BEM CSS NAMING CONVENTION
Comments
Top