Adjust Dropdown Component Style
This commit is contained in:
1 parent
c3f24f5e6d
commit
68ebed341f
2 files changed
+10
-10
No files matched your search
@@ -2,10 +2,10 @@
|
|||||||
@use "sass:color";
|
@use "sass:color";
|
||||||
@use "styles/library" as library;
|
@use "styles/library" as library;
|
||||||
|
|
||||||
$dropdown_bg: oklch(1 0 0); // FFFFFF
|
$dropdown_bg: oklch(1 0 0); // #FFFFFF
|
||||||
$dropdown_border_color: oklch(0 0 0 / 20%);
|
$dropdown_border_color: oklch(0 0 0 / 20%);
|
||||||
$dropdown_hover: oklch(0.9702 0 0); // F5F5F5
|
$dropdown_hover: oklch(0.9702 0 0); // #F5F5F5
|
||||||
$dropdown_selected: oklch(0.9738 0.0151 54.93); // FFF4ED
|
$dropdown_selected: oklch(0.9738 0.0151 54.93); // #FFF4ED
|
||||||
$dropdown_accent: oklch(0.7086 0.1896 39.86); // #FF6E37
|
$dropdown_accent: oklch(0.7086 0.1896 39.86); // #FF6E37
|
||||||
|
|
||||||
$dropdown_height: 40px;
|
$dropdown_height: 40px;
|
||||||
@@ -55,11 +55,13 @@ $dropdown_animation_duration: 0.2s;
|
|||||||
.placeholder {
|
.placeholder {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
line-height: 1.2; // descender(g, y 등)가 잘리지 않도록 행간 확보
|
height: 24px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
|
align-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chevron {
|
.chevron {
|
||||||
@@ -79,7 +81,7 @@ $dropdown_animation_duration: 0.2s;
|
|||||||
top: calc(100% + 4px);
|
top: calc(100% + 4px);
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0; // 아이템이 꽉 차도록 패딩 제거
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
background-color: $dropdown_bg;
|
background-color: $dropdown_bg;
|
||||||
@@ -90,7 +92,6 @@ $dropdown_animation_duration: 0.2s;
|
|||||||
box-shadow: 0 4px 12px oklch(0 0 0 / 10%); // rgba(0, 0, 0, 0.1)
|
box-shadow: 0 4px 12px oklch(0 0 0 / 10%); // rgba(0, 0, 0, 0.1)
|
||||||
animation: slideIn var(--dropdown-duration) $dropdown_animation_timing;
|
animation: slideIn var(--dropdown-duration) $dropdown_animation_timing;
|
||||||
|
|
||||||
// 자식 요소의 배경색이 테두리를 침범하지 못하도록 하는 사용자님의 핵심 설계 복구
|
|
||||||
&::after {
|
&::after {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -98,7 +99,7 @@ $dropdown_animation_duration: 0.2s;
|
|||||||
border-radius: $dropdown_border_radius;
|
border-radius: $dropdown_border_radius;
|
||||||
box-shadow: 0 0 0 1px $dropdown_border_color inset;
|
box-shadow: 0 0 0 1px $dropdown_border_color inset;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: 1001; // 테두리를 최상단으로!
|
z-index: 1001;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes slideIn {
|
@keyframes slideIn {
|
||||||
@@ -113,7 +114,7 @@ $dropdown_animation_duration: 0.2s;
|
|||||||
height: 40px;
|
height: 40px;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
position: relative;
|
position: relative;
|
||||||
line-height: 1.2; // descender 보호를 위해 1에서 1.2로 수정
|
align-content: center;
|
||||||
transition: background-color var(--dropdown-duration) $dropdown_animation_timing;
|
transition: background-color var(--dropdown-duration) $dropdown_animation_timing;
|
||||||
|
|
||||||
&:hover, &.focused {
|
&:hover, &.focused {
|
||||||
|
|||||||
+1
-2
@@ -57,8 +57,7 @@ if (isMainModule(import.meta.url) || process.env['pm_id']) {
|
|||||||
if (error) {
|
if (error) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
console.log(`Node Express server listening on http://${host}:${port}`);
|
||||||
console.log(`Node Express server listening...`);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user