Skip to content

Commit e2a4303

Browse files
ClaudioGSDBClaudioGSDB
andauthored
fix: vertically center chart legend and tooltip markers (#238)
Co-authored-by: ClaudioGSDB <csciotto@amazon.de>
1 parent 2d811fb commit e2a4303

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/internal/components/chart-legend/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
@include styles.default-text-style;
6464

6565
display: inline-flex;
66+
align-items: center;
6667
padding-block: 0;
6768
padding-inline: 0;
6869
border-block: 0;

src/internal/components/series-details/styles.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ $font-weight-bold: cs.$font-weight-heading-s;
4040
> .key {
4141
@include styles.text-wrapping;
4242
display: inline-flex;
43+
align-items: center;
4344
color: cs.$color-text-group-label;
4445
}
4546
}
@@ -101,7 +102,8 @@ $font-weight-bold: cs.$font-weight-heading-s;
101102

102103
.highlight-indicator {
103104
position: absolute;
104-
top: 3px;
105+
top: 50%;
106+
transform: translateY(-50%);
105107
left: -6px;
106108
inline-size: 3px;
107109
block-size: calc(marker.$marker-size - 2px);

src/internal/components/series-marker/styles.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88

99
$marker-size: 16px;
1010
$marker-inline-size: 25px; // marker-inline-size is greater than marker-size, to have space for the (potential) status marker.
11-
$marker-margin-top: cs.$space-static-xxxs;
1211
$marker-margin-right: cs.$space-static-xxs;
1312

1413
.marker {
1514
@include styles.styles-reset;
16-
margin-block-start: $marker-margin-top;
1715
border-start-start-radius: 2px;
1816
border-start-end-radius: 2px;
1917
border-end-start-radius: 2px;

0 commit comments

Comments
 (0)