Skip to content

Commit

Permalink
fix: issue with wrong padding for badge
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget committed Jun 24, 2024
1 parent aa7ca11 commit bf2b54a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 15 deletions.
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.
19 changes: 8 additions & 11 deletions packages/components/src/components/badge/badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@
block-size: fit-content;
inline-size: fit-content;

&:empty,
> span:empty {
block-size: var(--badge-size);
inline-size: var(--badge-size);
padding: 0;
}

&:has(.db-icon) {
padding: variables.$db-spacing-fixed-3xs;
}
Expand All @@ -67,10 +60,7 @@
&[data-size="medium"] {
--badge-size: #{variables.$db-spacing-fixed-sm};
@extend %db-overwrite-font-size-sm;

&:not(:empty, > span:empty) {
padding-inline: variables.$db-spacing-fixed-xs;
}
padding-inline: variables.$db-spacing-fixed-xs;

&:has(.db-icon) {
padding: variables.$db-spacing-fixed-2xs;
Expand All @@ -82,6 +72,13 @@
}
}

&:empty,
> span:empty {
block-size: var(--badge-size);
inline-size: var(--badge-size);
padding: 0;
}

&[data-placement^="corner"] {
@extend %absolute-badge;

Expand Down
7 changes: 3 additions & 4 deletions scripts/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ inquirer
return;
}

// Let startCommand = 'npm-run-all -p start:foundations dev:sass';
let startCommand = 'npm run start:foundations & npm run dev:sass';
let startCommand = 'npm-run-all -p start:foundations dev:sass';

const currentAnswers = answers?.frameworks;

Expand All @@ -80,12 +79,12 @@ inquirer
);

if (isAnswerSelected) {
startCommand += ` & npm run dev:${framework}-components`;
startCommand += ` dev:${framework}-components`;
}
}

for (const currentAnswer of currentAnswers) {
startCommand += ` & npm run start-showcase:${currentAnswer} --if-present`;
startCommand += ` start-showcase:${currentAnswer}`;
}

// TODO: Handle child process better
Expand Down

0 comments on commit bf2b54a

Please sign in to comment.