Skip to content

Commit

Permalink
fix(CellButton): decrease space between icon and text (#7658)
Browse files Browse the repository at this point in the history
исправлен слишком большой отступ между иконкой в before и текстом в режиме centered.
  • Loading branch information
andrey-medvedev-vk authored Sep 25, 2024
1 parent 9ac63e2 commit c96f0b6
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const CellButtonPlayground = (props: ComponentPlaygroundProps) => {
{
centered: [true],
children: ['Создать что-нибудь'],
before: [undefined, <Icon24Add key="add" />],
},
{
mode: [undefined, 'danger'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@

/* stylelint-disable-next-line selector-pseudo-class-disallowed-list */
.CellButton--centered :global(.vkuiIcon) {
padding-inline-end: 8px;
/* компенсируем отступ заданные в SimpleCell__before */
margin-inline-end: calc(
-1 * var(--vkui_internal--SimpleCell-before-inline-padding-end, var(--vkui--spacing_size_xl))
);
padding-inline-end: var(--vkui--spacing_size_m);
}

.CellButton {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.SimpleCell {
--vkui_internal--SimpleCell-before-inline-padding-end: var(--vkui--spacing_size_xl);

display: flex;
align-items: center;
min-block-size: 48px;
Expand All @@ -24,7 +26,7 @@
display: flex;
align-items: center;
padding-block: var(--vkui--spacing_size_s);
padding-inline-end: var(--vkui--spacing_size_xl);
padding-inline-end: var(--vkui_internal--SimpleCell-before-inline-padding-end);
color: var(--vkui_internal--icon_color, var(--vkui--color_icon_accent));
}

Expand Down

0 comments on commit c96f0b6

Please sign in to comment.