Complete the code to define a CSS class using the BEM naming convention for a button block.
.button[1] { background-color: blue; color: white; padding: 1rem; }
In BEM, modifiers use double dashes --. So .button--primary is correct.
Complete the code to define a BEM element for a button icon inside the button block.
.button[1] { width: 1.5rem; height: 1.5rem; }
In BEM, elements use double underscores __. So .button__icon is correct.
Fix the error in the BEM class name for a disabled button modifier.
.button[1] { opacity: 0.5; cursor: not-allowed; }
Modifiers in BEM use double dashes --. So .button--disabled is correct.
Fill both blanks to create a BEM class for a button block with a disabled modifier and an icon element.
.button[1] { opacity: 0.5; } .button[2] { width: 1.5rem; height: 1.5rem; }
The modifier uses --disabled and the element uses __icon in BEM.
Fill all three blanks to create a BEM class for a card block, its header element, and a highlighted modifier.
.card[1] { border: 1px solid #ccc; } .card[2] { font-weight: bold; } .card[3] { background-color: yellow; }
The element is __header, and the modifier is --highlight or --highlighted. Here, --highlight is used for the first modifier and --highlighted for the last. The correct sequence is .card--highlight, .card__header, and .card--highlighted.