K
K
kudder12018-11-15 15:18:24
Development Methodologies
kudder1, 2018-11-15 15:18:24

Is it possible to reuse an element in another BEM block?

I have an album block , it has two elements with their own styling: albums_year and albums_title .
There are other blocks, they require elements with the same styling. It looks like this:
songs
albums_year
albums__title
Or do we need to re-create the selectors, copy the styles into them and rename them to songs_year, and songs_title?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2018-11-20
@kudder1

Our company would do this https://codepen.io/anon/pen/eQeqpJ (spoiler - mixins)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question