Skip to content

Commit cb5752c

Browse files
committed
wip
1 parent e5b6444 commit cb5752c

File tree

3 files changed

+44
-42
lines changed

3 files changed

+44
-42
lines changed
Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
.bottom-sheet {
2-
[data-d-sheet~="view"] {
3-
z-index: 9999;
4-
}
5-
6-
:where(&__content) {
7-
box-sizing: border-box;
8-
height: auto;
9-
max-width: 700px;
10-
padding-bottom: max(
11-
calc(env(safe-area-inset-bottom, 0px) + 12px),
12-
var(--space-5)
13-
);
14-
display: grid;
15-
justify-items: center;
16-
}
17-
18-
:where(&__bleeding-background) {
19-
border-radius: var(--d-border-radius-large);
20-
background-color: var(--secondary);
21-
box-shadow:
22-
0 10px 15px -3px rgb(0 0 0 / 10%),
23-
0 4px 6px -4px rgb(0 0 0 / 10%);
24-
}
1+
.bottom-sheet__view {
2+
height: calc(max(100dvh, 100lvh) + 60px);
3+
}
254

26-
:where(&__view) {
27-
top: 0;
28-
bottom: initial;
29-
height: calc(max(100dvh, 100lvh) + 60px);
30-
}
5+
.bottom-sheet__content {
6+
box-sizing: border-box;
7+
height: auto;
8+
min-height: 100px;
9+
max-width: 700px;
10+
padding-bottom: max(
11+
calc(env(safe-area-inset-bottom, 0px) + 12px),
12+
var(--space-5)
13+
);
14+
display: grid;
15+
justify-items: center;
3116

32-
:where(&__content).--expandable {
17+
&.--expandable {
3318
height: calc(100% - max(env(safe-area-inset-top), var(--space-1)));
3419
overflow: hidden;
3520
grid-template-rows: auto 1fr;
3621
}
22+
}
3723

38-
:where(&__scroll-view) {
39-
width: 100%;
40-
min-height: 0;
41-
}
24+
.bottom-sheet__bleeding-background {
25+
border-radius: var(--d-border-radius-large);
26+
background-color: var(--secondary);
27+
box-shadow: var(--shadow-card);
28+
}
4229

43-
:where(&__input) {
44-
box-sizing: border-box;
45-
width: 100%;
46-
height: 35px;
47-
padding-inline: var(--space-4);
48-
margin-bottom: var(--space-4);
49-
}
30+
.bottom-sheet__handle {
31+
width: 50px;
32+
height: 6px;
33+
border: 0;
34+
border-radius: 9999px;
35+
background-color: var(--primary-low-mid);
36+
cursor: pointer;
37+
}
38+
39+
.bottom-sheet__scroll-view {
40+
width: 100%;
41+
min-height: 0;
42+
}
43+
44+
.bottom-sheet__input {
45+
box-sizing: border-box;
46+
width: 100%;
47+
height: 35px;
48+
padding-inline: var(--space-4);
49+
margin-bottom: var(--space-4);
5050
}

app/assets/stylesheets/common/float-kit/d-sheet.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@
143143
}
144144

145145
[data-d-sheet~="view"] {
146+
z-index: z("modal", "overlay");
147+
146148
--d-sheet-minimum-snap-distance: var(
147149
--d-sheet-minimum-snap-distance-from-props,
148150
1px

frontend/discourse/float-kit/components/d-bottom-sheet.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const BottomSheetContent = <template>
123123
</BottomSheetInnerContent>
124124
</ExpandableView>
125125
{{else}}
126-
<DSheet.View @sheet={{@sheet}}>
126+
<DSheet.View class="bottom-sheet__view" @sheet={{@sheet}}>
127127
<BottomSheetInnerContent
128128
@sheet={{@sheet}}
129129
@expandable={{false}}

0 commit comments

Comments
 (0)