Fix CustomSelect panel to left-align by default, right-align only when it would overflow the viewport
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
90789b5f47
commit
d2952cddd2
+8
-2
@@ -475,8 +475,8 @@
|
||||
.cs-panel {
|
||||
position: absolute;
|
||||
top: calc(100% + 4px);
|
||||
right: 0; /* right edge flushes with button's right edge */
|
||||
left: auto;
|
||||
left: 0; /* left edge flushes with button's left edge by default */
|
||||
right: auto;
|
||||
z-index: 1000;
|
||||
background: #fffcf2;
|
||||
border: 1.5px solid #c9b08a;
|
||||
@@ -487,6 +487,12 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Flip panel to right-align when left-align would overflow the viewport */
|
||||
.cs-panel.cs-panel--right {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
/* Each option row */
|
||||
.cs-option {
|
||||
display: block;
|
||||
|
||||
Reference in New Issue
Block a user