Skip to content

Commit 3b39bd0

Browse files
chore(styles): enhance mobile responsiveness in support drawer and drawer components, adjust font sizes for better readability
1 parent 1e56153 commit 3b39bd0

File tree

3 files changed

+42
-7
lines changed

3 files changed

+42
-7
lines changed

apps/insights/src/components/Root/support-drawer.module.scss

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,33 @@
3434
grid-template-columns: max-content 1fr max-content;
3535
grid-template-rows: max-content max-content;
3636
text-align: left;
37-
gap: theme.spacing(2) theme.spacing(4);
38-
align-items: center;
37+
gap: theme.spacing(1) theme.spacing(4);
38+
align-items: start;
3939
width: 100%;
4040

4141
.icon {
42-
font-size: theme.spacing(8);
42+
font-size: theme.spacing(6);
4343
color: theme.color("states", "data", "normal");
4444
grid-row: span 2 / span 2;
4545
display: grid;
4646
place-content: center;
4747
}
4848

4949
.header {
50-
@include theme.text("sm", "medium");
51-
50+
@include theme.h6;
51+
line-height: 1.5;
5252
color: theme.color("heading");
5353
}
5454

5555
.description {
56-
@include theme.text("xs", "normal");
57-
56+
@include theme.text("sm", "normal");
57+
line-height: 1.5;
5858
color: theme.color("muted");
5959
grid-column: 2;
6060
grid-row: 2;
61+
word-wrap: break-word;
62+
overflow: hidden;
63+
max-width: 100%;
6164
}
6265

6366
.caret {

packages/component-library/src/Drawer/index.module.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121
flex-flow: column nowrap;
2222
overflow-y: hidden;
2323
padding-bottom: theme.border-radius("3xl");
24+
@include theme.mobile {
25+
width: 100%;
26+
inset: 0;
27+
border-radius: 0;
28+
border: none;
29+
padding-bottom: 0;
30+
}
2431

2532
.heading {
2633
padding: theme.spacing(4);
@@ -33,6 +40,11 @@
3340
flex: none;
3441
border-bottom: 1px solid theme.color("border");
3542

43+
@include theme.mobile {
44+
padding: theme.spacing(3);
45+
padding-left: theme.spacing(4);
46+
}
47+
3648
.title {
3749
@include theme.h4;
3850

@@ -52,7 +64,11 @@
5264
.body {
5365
flex: 1;
5466
overflow-y: auto;
67+
overflow-x: hidden;
5568
padding: theme.spacing(6);
69+
@include theme.mobile {
70+
padding: theme.spacing(4);
71+
}
5672
}
5773

5874
&[data-fill] {

packages/component-library/src/theme.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,22 @@ $elevations: (
820820
letter-spacing: letter-spacing("tight");
821821
margin: 0;
822822
}
823+
@mixin h5 {
824+
font-size: font-size("lg");
825+
font-style: normal;
826+
font-weight: font-weight("medium");
827+
line-height: 125%;
828+
letter-spacing: letter-spacing("tight");
829+
margin: 0;
830+
}
831+
@mixin h6 {
832+
font-size: font-size("base");
833+
font-style: normal;
834+
font-weight: font-weight("medium");
835+
line-height: 125%;
836+
letter-spacing: letter-spacing("tight");
837+
margin: 0;
838+
}
823839

824840
@mixin text($size: "base", $weight: "normal") {
825841
font-size: font-size($size);

0 commit comments

Comments
 (0)