Skip to content

Commit

Permalink
fix(select): prevent align issue on small width
Browse files Browse the repository at this point in the history
  • Loading branch information
dpellier committed Jul 29, 2024
1 parent 3192687 commit 246587d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $select-padding-right: $select-caret-size + ($select-base-padding * 2);
}

@mixin ods-select-placeholder() {
white-space: nowrap;
color: var(--ods-color-neutral-600);
}

Expand Down Expand Up @@ -128,6 +129,7 @@ $select-padding-right: $select-caret-size + ($select-base-padding * 2);
@include checkbox.ods-checkbox();

margin-right: 8px;
min-width: checkbox.$ods-checkbox-size;
}
}

Expand All @@ -143,6 +145,7 @@ $select-padding-right: $select-caret-size + ($select-base-padding * 2);
background: $select-background-color;
cursor: pointer;
padding: 0;
white-space: nowrap;
}

.ts-merged-items-placeholder {
Expand All @@ -159,7 +162,6 @@ $select-padding-right: $select-caret-size + ($select-base-padding * 2);

position: absolute;
right: 0;
transform: translateY(-50%);
margin: 0;
border: none;
background-color: inherit;
Expand Down Expand Up @@ -193,6 +195,14 @@ $select-padding-right: $select-caret-size + ($select-base-padding * 2);
}
}

&.single {
.ts-control {
&::after {
transform: translateY(-50%);
}
}
}

&.multi {
&.plugin-placeholder {
.ts-placeholder {
Expand Down
6 changes: 4 additions & 2 deletions packages/ods/src/style/_checkbox.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@use './focus';
@use './icon';

$ods-checkbox-size: 16px;

@mixin ods-checkbox() {
appearance: none;
display: inline-flex;
Expand All @@ -11,8 +13,8 @@
border-radius: var(--ods-border-radius-sm);
background: var(--ods-color-primary-000);
cursor: pointer;
width: 16px;
height: 16px;
width: $ods-checkbox-size;
height: $ods-checkbox-size;

&::before {
@include icon.ods-icon();
Expand Down

0 comments on commit 246587d

Please sign in to comment.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy