diff --git a/customize.dist/src/less2/include/toolbar-history.less b/customize.dist/src/less2/include/toolbar-history.less index 194a32dcd..27b2552aa 100644 --- a/customize.dist/src/less2/include/toolbar-history.less +++ b/customize.dist/src/less2/include/toolbar-history.less @@ -73,8 +73,8 @@ text-transform: uppercase; display: inline-flex; align-items: center; - .fa:not(:last-child) { - margin-right: 5px; + i:not(:last-child) { + margin-right: 0.5rem; } &:hover { background-color: fade(@cp_toolbar-fg, 30%); diff --git a/customize.dist/src/less2/include/toolbar.less b/customize.dist/src/less2/include/toolbar.less index 723634a55..9d11dde7d 100644 --- a/customize.dist/src/less2/include/toolbar.less +++ b/customize.dist/src/less2/include/toolbar.less @@ -987,11 +987,8 @@ height: @toolbar_line-height; display: inline-flex; align-items: center; - .fa, .cptools { - margin-right: 5px; - } - .cp-dropdown-button-title .cp-icon { - margin-left: 5px; + i ~ span { + margin-left: 0.5rem; } &:hover { background-color: fade(@cp_toolbar-bottom-bg, 70%); @@ -1113,15 +1110,6 @@ } } .cp-toolbar-bottom-left { - .cp-toolbar-appmenu, .cp-toolbar-file { - button { - &::before, .fa { - min-width: 20px; - text-align: center; - margin-right: 0; - } - } - } .cp-toolbar-file { order: 1; } diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index c36ae7c48..ac1d55bb2 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -623,13 +623,22 @@ define([ var appType = (common.getMetadataMgr().getMetadata().type || 'pad').toUpperCase(); data = data || {}; if (!callback && data.callback) { callback = data.callback; } + + let makeButton = function(iconClasses, buttonClasses, title, text) { + const ariaLabel = title || text || ''; + return $(h('button', { + class: buttonClasses, + title: title, + 'aria-label': ariaLabel + }, [ + iconClasses ? h('i', { class: iconClasses }) : null, + text ? h('span', { class: 'cp-toolbar-drawer-element' }, text) : null + ])); + }; + switch (type) { case 'export': - button = $('