mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 07:03:35 +08:00
Only give dropdown menu items padding if they have an icon
This commit is contained in:
parent
d85ae8745e
commit
a2049feddf
|
@ -13,7 +13,7 @@ export default class ActionButton extends Component {
|
||||||
delete attrs.label;
|
delete attrs.label;
|
||||||
|
|
||||||
attrs.href = attrs.href || 'javascript:;';
|
attrs.href = attrs.href || 'javascript:;';
|
||||||
return m('a', attrs, [
|
return m('a'+(iconName ? '.has-icon' : ''), attrs, [
|
||||||
iconName ? icon(iconName+' icon') : '',
|
iconName ? icon(iconName+' icon') : '',
|
||||||
m('span.label', label)
|
m('span.label', label)
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -6,14 +6,22 @@
|
||||||
color: @fl-body-color;
|
color: @fl-body-color;
|
||||||
.box-shadow(0 2px 6px @fl-shadow-color);
|
.box-shadow(0 2px 6px @fl-shadow-color);
|
||||||
|
|
||||||
& > li > a {
|
& > li > a:hover,
|
||||||
padding: 8px 15px 8px 40px;
|
& > li > a:focus,
|
||||||
color: @fl-body-color;
|
& > .active > a,
|
||||||
|
& > .active > a:hover,
|
||||||
&:hover, &:focus {
|
& > .active > a:focus {
|
||||||
color: @fl-body-color;
|
color: @fl-body-color;
|
||||||
background-color: @fl-body-control-bg;
|
background-color: @fl-body-control-bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& > li > a {
|
||||||
|
padding: 8px 15px;
|
||||||
|
color: @fl-body-color;
|
||||||
|
|
||||||
|
&.has-icon {
|
||||||
|
padding-left: 40px;
|
||||||
|
}
|
||||||
&.disabled {
|
&.disabled {
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user