scss: put buttons icons code inside @mixin (#74954)
gitea/publik-base-theme/pipeline/head This commit looks good
Details
gitea/publik-base-theme/pipeline/head This commit looks good
Details
parent
b086575235
commit
a83e13fde0
|
@ -656,34 +656,40 @@ div.select2-search {
|
|||
}
|
||||
}
|
||||
|
||||
// Buttons with icons
|
||||
|
||||
.submit-button-with-icon {
|
||||
&::after {
|
||||
// Button with FontAwesome icon
|
||||
// $position: left || right
|
||||
// $character : UTF value
|
||||
@mixin button-with-icon($position: right, $character: '\f105') {
|
||||
&::before, &::after {
|
||||
font-family: FontAwesome;
|
||||
content: $submit-button-icon;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
@if ($position == left) {
|
||||
&::before {
|
||||
content: $character;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
}
|
||||
@if ($position == right) {
|
||||
&::after {
|
||||
content: $character;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.previous-button-with-icon {
|
||||
&::before {
|
||||
font-family: FontAwesome;
|
||||
content: $previous-button-icon;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.cancel-button-with-icon {
|
||||
&::before {
|
||||
font-family: FontAwesome;
|
||||
content: $cancel-button-icon;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@if $buttons-with-icons {
|
||||
.submit-button-with-icon {
|
||||
@include button-with-icon(right, $submit-button-icon);
|
||||
}
|
||||
|
||||
.previous-button-with-icon {
|
||||
@include button-with-icon(left, $previous-button-icon);
|
||||
}
|
||||
|
||||
.cancel-button-with-icon {
|
||||
@include button-with-icon(left, $cancel-button-icon);
|
||||
}
|
||||
|
||||
.quixote:not(#wf-actions) div.buttons {
|
||||
@each $btn in (submit, previous, cancel) {
|
||||
.#{$btn}-button button {
|
||||
|
|
Loading…
Reference in New Issue