mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 06:08:21 +01:00
Improve style of button with single icon without text (#5952)
This commit is contained in:
parent
f685548885
commit
418812dbed
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* This file is generated by the "yii asset" command.
|
||||
* DO NOT MODIFY THIS FILE DIRECTLY.
|
||||
* @version 2022-11-29 11:02:20
|
||||
* @version 2022-11-29 14:04:39
|
||||
*/
|
||||
return [
|
||||
'app' => [
|
||||
|
@ -227,6 +227,10 @@ class Button extends BootstrapComponent
|
||||
$this->htmlOptions['data-action-method'] = $method;
|
||||
}
|
||||
|
||||
if ($this->text === null && $this->_icon !== null) {
|
||||
$this->htmlOptions['class'] .= ' btn-icon-only';
|
||||
}
|
||||
|
||||
if ($this->_link) {
|
||||
$href = isset($this->htmlOptions['href']) ? $this->htmlOptions['href'] : null;
|
||||
return Html::a($this->getText(), $href, $this->htmlOptions);
|
||||
|
@ -15,8 +15,10 @@
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
padding: 8px 16px;
|
||||
i {
|
||||
margin-right: 4px;
|
||||
&:not(.btn-icon-only) {
|
||||
i.fa {
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user