Skip to content

Commit 9a99b0f

Browse files
authored
fix(breadcrumbs): Use subgrid to align log levels (#76148)
1 parent fad1a67 commit 9a99b0f

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

static/app/components/events/breadcrumbs/breadcrumbsTimeline.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ const Subtitle = styled('p')`
144144

145145
const Timestamp = styled('div')`
146146
margin-right: ${space(1)};
147+
text-align: right;
147148
color: ${p => p.theme.subText};
148149
font-size: ${p => p.theme.fontSizeSmall};
149150
span {

static/app/components/timeline/index.tsx

+9-8
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,13 @@ export const Item = forwardRef(function _Item(
6262
const Row = styled('div')<{showLastLine?: boolean}>`
6363
position: relative;
6464
color: ${p => p.theme.subText};
65-
display: grid;
6665
align-items: start;
67-
grid-template: auto auto / 22px 1fr auto;
68-
grid-column-gap: ${space(1)};
69-
margin: ${space(1)} 0;
70-
&:first-child {
71-
margin-top: 0;
72-
}
66+
display: grid;
67+
grid-template-columns: subgrid;
68+
grid-column: 1/-1;
69+
grid-row-gap: ${space(0.5)};
70+
7371
&:last-child {
74-
margin-bottom: 0;
7572
/* Show/hide connecting line from the last element of the timeline */
7673
background: ${p => (p.showLastLine ? 'transparent' : p.theme.background)};
7774
}
@@ -136,6 +133,10 @@ export const Data = styled('div')`
136133

137134
export const Container = styled('div')`
138135
position: relative;
136+
display: grid;
137+
grid-template: auto auto / 22px 1fr auto;
138+
grid-row-gap: ${space(1)};
139+
grid-column-gap: ${space(1)};
139140
/* vertical line connecting items */
140141
&::before {
141142
content: '';

0 commit comments

Comments
 (0)