1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-09 15:35:25 +02:00

Fix paddings of icon only button

This commit is contained in:
Tanya Fomina 2022-05-29 22:08:05 +08:00
parent f714225e20
commit 6df791be1f
2 changed files with 16 additions and 3 deletions

View file

@ -24,7 +24,7 @@
<{{tag}}
{{ name is not empty ? 'name="' ~ name ~ '"': '' }}
class="{{ mainClass }} {{ mainClass }}--{{ style|default('primary') }} {{ mainClass }}--{{ size|default('default') }} {{ icon ? mainClass ~ '--with-icon' : '' }} {{ class ?? '' }}"
class="{{ mainClass }} {{ mainClass }}--{{ style|default('primary') }} {{ mainClass }}--{{ size|default('default') }} {{ icon ? mainClass ~ '--with-icon' : '' }} {{label ? mainClass ~ '--with-label' : ''}} {{ class ?? '' }}"
{{ url is not empty ? 'href="' ~ url ~ '"' : '' }}
>
{% if icon %}

View file

@ -23,7 +23,6 @@
display: inline-flex;
align-items: center;
justify-content: center;
margin-right: 4px;
svg {
width: 24px;
@ -32,12 +31,22 @@
}
}
&--with-label &__icon {
margin-right: 4px;
}
&--default {
--height: 40px;
}
&--small {
--height: 32px;
}
&--small&--with-label {
padding-right: 10px;
}
@ -77,7 +86,11 @@
}
}
&--with-icon {
&--with-icon&--with-label {
padding-left: 8px;
}
&--small&--with-icon&--with-label {
padding-left: 6px;
}
}