Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[Bug] Fix text collision on toggle input (#973)

Jon Sadkad7318ecc1774
diff --git a/src/components/common/checkbox.js b/src/components/common/checkbox.js
index 26917e4bb..5063c030e 100644
--- a/src/components/common/checkbox.js
+++ b/src/components/common/checkbox.js
@@ -40,7 +40,7 @@ const HiddenInput = styled.input`
`;
const StyledCheckbox = styled.div`
- line-height: 0;
+ display: flex;
min-height: ${props => props.theme.switchBtnHeight};
margin-left: ${props => props.theme.switchLabelMargin}px;
`;
diff --git a/src/styles/base.js b/src/styles/base.js
index fd8cf053a..695d9d413 100644
--- a/src/styles/base.js
+++ b/src/styles/base.js
@@ -502,13 +502,13 @@ const switchButton = css`
const inputSwitch = css`
user-select: none;
cursor: pointer;
- line-height: 0;
+ line-height: 16px;
font-weight: 500;
font-size: 12px;
color: ${props => props.theme.labelColor};
position: relative;
display: inline-block;
- padding-top: ${props => props.theme.switchHeight / 2}px;
+ padding-top: 0;
padding-right: 0;
padding-bottom: 0;
padding-left: ${props => props.theme.switchWidth}px;