finally align the menu items correctly

I had to wrap the labels in their own span and use flex box to make them
behave correctly. Simplifications welcome.
This commit is contained in:
Andreas Gohr 2017-02-16 16:58:36 +01:00
commit fa1028ad60
3 changed files with 27 additions and 16 deletions

View file

@ -65,7 +65,7 @@ jQuery(function () {
// prepare text and the optional icon
const data = $me.text().split('@', 2);
const text = data[0].trim();
const $icon = jQuery('<span>')
const $icon = jQuery('<span class="ico">')
.text(text.substr(0, 1).toUpperCase() + text.substr(1, 1).toLowerCase())
.wrapInner('<strong>');
if (data[1]) {
@ -78,6 +78,7 @@ jQuery(function () {
.attr('role', 'heading')
.attr('aria-level', '2')
.text(text)
.wrapInner('<span class="lbl">')
.prepend($icon)
;