Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. # COMPONENTS
  2.  
  3. A page module that has a certain purpose and is a wrapper for it’s children,
  4. in example a modal or a slider can be a component.
  5.  
  6. Components use a name:
  7.  
  8. .component {}
  9. .component-name {}
  10.  
  11. A name can consist of different words separated by a “-” (dash).
  12.  
  13. # VARIANTS
  14.  
  15. A component and its containing elements which are modified in a certain way.
  16.  
  17. .component--variant {}
  18. .component-name--variant-modifier {}
  19.  
  20. A variant is divided by “--”(double dash) from the main component’s name.
  21. It can contain “-”(dashes) to separate words from each other.
  22.  
  23. # NESTED ELEMENTS
  24.  
  25. Parts of which a component can consist, sometimes similar across components.
  26.  
  27. .component__link {}
  28. .component-name__link-element {}
  29.  
  30. # MODIFIERS / STATES
  31.  
  32. The state of a component or nested element is modified by user interaction,
  33. for example a disabled button.
  34.  
  35. A component can be modified via a separate class:
  36.  
  37. .component.is-active {}
  38. .component-name.has-children {}
  39. .component.js-selected {}
  40.  
  41. A modifier class is a verb combined with the purpose it has to describe the state of the component,
  42. which are separated with a “-” (dash).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement