Skip to content

Commit afe0448

Browse files
fix(css): fix flex columns in mobile version
1 parent f9dccb3 commit afe0448

3 files changed

Lines changed: 51 additions & 19 deletions

File tree

src/pages/home/sections/Callstack/Callstack.styled.ts

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@ import styled from '@emotion/styled';
22
import { css } from '@emotion/react';
33
import InfoClosed from 'components/CloseIcon/InfoIcon.tsx';
44

5-
export const Callstack = styled.div`
6-
flex: 1;
7-
display: flex;
8-
flex-direction: column-reverse;
9-
justify-content: end;
10-
gap: 20px;
11-
`;
5+
export const Callstack = styled.div(
6+
({ theme }) => css`
7+
flex: 1;
8+
display: flex;
9+
flex-direction: row-reverse;
10+
justify-content: end;
11+
gap: 20px;
12+
13+
@media (min-width: ${theme.custom.breakpoints.desktop}px) {
14+
flex-direction: column-reverse;
15+
}
16+
`
17+
);
1218

1319
export const CallstackElement = styled.div(
1420
({ theme }) => css`
@@ -18,6 +24,17 @@ export const CallstackElement = styled.div(
1824
border-radius: 5px;
1925
padding: 10px;
2026
word-wrap: break-word;
27+
word-break: break-word;
28+
display: flex;
29+
align-items: center;
30+
justify-content: center;
31+
flex: 1;
32+
max-width: 33.33%;
33+
34+
@media (min-width: ${theme.custom.breakpoints.desktop}px) {
35+
max-width: unset;
36+
flex-grow: 0;
37+
}
2138
`
2239
);
2340

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
import styled from '@emotion/styled';
22
import { css } from '@emotion/react';
33

4-
export const LogQueue = styled.div`
5-
flex: 1;
6-
display: flex;
7-
flex-direction: column;
8-
justify-content: start;
9-
gap: 20px;
10-
`;
4+
export const LogQueue = styled.div(
5+
({ theme }) => css`
6+
flex: 1;
7+
display: flex;
8+
justify-content: start;
9+
gap: 20px;
10+
11+
@media (min-width: ${theme.custom.breakpoints.desktop}px) {
12+
flex-direction: column;
13+
}
14+
`
15+
);
1116

1217
export const Log = styled.div(
1318
({ theme }) => css`
@@ -17,5 +22,15 @@ export const Log = styled.div(
1722
border-radius: 5px;
1823
padding: 10px;
1924
word-wrap: break-word;
25+
display: flex;
26+
align-items: center;
27+
justify-content: center;
28+
flex: 1;
29+
max-width: 33.33%;
30+
31+
@media (min-width: ${theme.custom.breakpoints.desktop}px) {
32+
max-width: unset;
33+
flex-grow: 0;
34+
}
2035
`
2136
);

src/theme/theme.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ export const getMuiTheme = (cs: ColorsSystem) =>
2020
fontSize: '14',
2121
color: cs.colors.onContainer.contrast,
2222
backgroundColor: cs.colors.onContainer.dim,
23-
transition: 'all 1s ease',
23+
transition: 'all 0.5s ease',
2424
},
2525
},
2626
},
2727
MuiMenu: {
2828
styleOverrides: {
2929
list: {
3030
backgroundColor: cs.colors.onContainer.dim,
31-
transition: 'all 1s ease',
31+
transition: 'all 0.5s ease',
3232
},
3333
},
3434
},
@@ -38,14 +38,14 @@ export const getMuiTheme = (cs: ColorsSystem) =>
3838
'&.Mui-focused .MuiOutlinedInput-notchedOutline': {
3939
borderColor: cs.colors.onContainer.normal,
4040
},
41-
transition: 'all 1s ease',
41+
transition: 'all 0.5s ease',
4242
},
4343
},
4444
},
4545
MuiButton: {
4646
styleOverrides: {
4747
root: {
48-
transition: 'all 1s ease',
48+
transition: 'all 0.5s ease',
4949
},
5050
},
5151
},
@@ -71,7 +71,7 @@ export const getTheme = (cs: ColorsSystem): Theme => {
7171
desktop: 768,
7272
},
7373
transitions: {
74-
color: '1s ease',
74+
color: '0.5s ease',
7575
},
7676
animations: {
7777
zoomIn: 'zoomIn 225ms cubic-bezier(0.4, 0, 0.2, 1)',

0 commit comments

Comments
 (0)