Y
Y
yarnstart2019-02-06 22:49:10
css
yarnstart, 2019-02-06 22:49:10

What are js hovers for?

example - any file on Yandex disk for example

link
https://yadi.sk/d/L8bOPn7O3AV9Js
Screenshot
5c5b390924f80390646074.jpeg

When hovering on the button "Save to Yandex.disk", the class "button2_hovered_yes" is hung on it and through it the background changes on the before pseudo-element, why is it done this way, and not on css ? If it were not for Yandex, it would be possible to attribute everything to the developer, but in this case, I suppose, the reason is different.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2019-02-07
@yarnstart

You can not look for a catch, there is none. Everything is very simple and prosaic - this is their native BEM in its purest interpretation. They also use the full BEM stack, not just class name notation. Any style is defined only by the class. Each component is in a separate folder, inside js/css/img, styles are divided into files - block/element/modifier styles are in separate files. All this is assembled by the miracle machine BEM.js.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question