Issue:
CSS selectors for the toolbar are pritty long and weight a lot. According to the new principles of defining styles (http://drupal.org/node/1887918) we should reduce weight of the selectors (the best would be to 0010 or 0011, more here: http://css-tricks.com/specifics-on-css-specificity/) and make it more reusable and lighter.
Example:
.js .toolbar .horizontal li - weight 0031
.toolbar .vertical.active > .lining - weight 0040
.toolbar .horizontal .toggle-orientation - weight 0030
.toolbar .vertical > .lining:before - weight 0031
The way I see it :
.js .toolbar-horizontal li - weight 0021
.toolbar-vertical.is-active > .lining - weight 0030
.toolbar-horizontal .toggle-orientation - weight 0020
.toolbar-vertical > .lining:before - weight 0021
Reducing the weight of the selectors will reduce the time for building the toolbar and give more sense to individual components, like .bar or .tray, which make more sense being .toolbar-bar and .toolbar-tray
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1963824-toolbar-refactoring-1.patch | 55.96 KB | oresh |
Comments
Comment #1
oresh commentedMy first attempt.
I actually started doing this: http://drupal.org/node/1849078
And fell into making all this changes.
So this patch can't be applied until #1849078 is resolved/closed. There's also http://drupal.org/node/1847314, which will have an influence on this issue.
Anyway should be tested. The changes are not visible for user perspective, but make a large impact on code structure and usability.
Comment #2
oresh commentedduplication of http://drupal.org/node/1938044