Trendyol / baklava

Baklava is a design system provided by Trendyol to create a consistent UI/UX for app users.
https://baklava.design/
MIT License
1.25k stars 110 forks source link

[BUG]: Checkbox's position:absolute value is taken from the entire page #895

Closed erbilnas closed 1 month ago

erbilnas commented 1 month ago

Issue description

When the checkbox is wrapped with a dialog, it should take its position relative to the height of the dialog, not the page.

https://stackblitz.com/edit/vue2-vite-starter-ncdgf1?file=index.html,src%2FApp.vue

Media & Screenshots

With position:absolute

Screenshot 2024-07-11 at 10 22 40

Without position:absolute

Screenshot 2024-07-11 at 10 22 58 Screenshot 2024-07-11 at 10 22 52

Baklava Version

3.0.0-beta.14

Operating system

No response

Priority this issue should have

Medium (should be fixed soon)

Please review the checkboxes that are applicable.

erbilnas commented 1 month ago

Imho, we should add

position: absolute;

on input instead of .check-mark

input[type="checkbox"] {
  appearance: none;
  outline: none;
  margin: 0;
  box-sizing: border-box;
  border: 1px solid var(--bl-color-neutral-lighter);
  border-radius: var(--bl-border-radius-xs);
  width: var(--bl-size-m);
  height: var(--bl-size-m);
  min-width: var(--bl-size-m);
  min-height: var(--bl-size-m);
  max-width: var(--bl-size-m);
  max-height: var(--bl-size-m);
}

.check-mark {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
@@ -43,6 +58,38 @@ input {
  background-color: var(--bl-color-neutral-full);
}