yandex-ui/nanoislands — pull request #232 by kizu (2014-02-20 16:12:44+00:00)
Title: Button refactoring

Made a lot of changes to buttons and linked blocks.

1. We should use [proper class names](http://yandex-ui.github.io/stylobate-islands/classnames/) and Stylobate calls. In this PR I refactored buttons to have proper classes. Each button now would have two classes: `nb-button` for telling everyone that it is a button and `nb[-SIZE][-THEME]-button`, like `nb-small-promo-button` that applies the styles for the size-theme pair. This means you still could use `nb-button` in selectors, but all the bem-style modifiers are gone.

2. I refactored the `button.yate` by moving all the common things to private functions. Code reuse FTW!

3. I refactored all the blocks that used buttons — radio buttons, checkboxes and selects, so they now use proper `nb-button()` calls. This would allow us to reuse the button code (yay!) and to pass all things that buttons understand to the blocks that use them. Before that radio-buttons and checkboxes, for example, couldn't have icons.