Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Removes hard-coded opacity and spacing from the BigNumber plugin #19536

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -277,59 +277,56 @@ class BigNumberVis extends React.PureComponent<BigNumberVisProps> {
}

export default styled(BigNumberVis)`
font-family: ${({ theme }) => theme.typography.families.sansSerif};
position: relative;
display: flex;
flex-direction: column;
justify-content: center;

&.no-trendline .subheader-line {
padding-bottom: 0.3em;
}

.text-container {
${({ theme }) => `
font-family: ${theme.typography.families.sansSerif};
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
.alert {
font-size: ${({ theme }) => theme.typography.sizes.s};
margin: -0.5em 0 0.4em;
line-height: 1;
padding: 2px 4px 3px;
border-radius: 3px;

&.no-trendline .subheader-line {
padding-bottom: 0.3em;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep em values because the font is scalling.

}
}

.kicker {
line-height: 1em;
padding-bottom: 2em;
}
.text-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
.alert {
font-size: ${theme.typography.sizes.s};
margin: -0.5em 0 0.4em;
line-height: 1;
padding: ${theme.gridUnit}px;
border-radius: ${theme.gridUnit}px;
}
}

.header-line {
position: relative;
line-height: 1em;
span {
position: absolute;
bottom: 0;
.kicker {
line-height: 1em;
padding-bottom: 2em;
}
}

.subheader-line {
line-height: 1em;
padding-bottom: 0;
}
.header-line {
position: relative;
line-height: 1em;
span {
position: absolute;
bottom: 0;
}
}

&.is-fallback-value {
.kicker,
.header-line,
.subheader-line {
opacity: 0.5;
line-height: 1em;
padding-bottom: 0;
}
}

.superset-data-ui-tooltip {
z-index: 1000;
background: #000;
}
&.is-fallback-value {
.kicker,
.header-line,
.subheader-line {
opacity: ${theme.opacity.mediumHeavy};
}
}
`}
`;