"A class should be open to extension and closed to modification"
.button
class by adding a property.button
class with a .button--blue
option, or more precisely a modifier (to follow the BEM convention)..button
trough an override, we created a class attached to the .context
class called .context__action
that is responsible for creating the required white space. button
and context
are being instantiated in different places (even different files)button
css file will delete all instances of the button
class of the code basebutton
with .context__action
, it could be for exemple, a link instead)button
into context
, we maybe don't want it to have a margin-left
in this specific use-case