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

fix: replace rem by px for Safari and Firefox support #544

Merged
merged 1 commit into from
Jun 8, 2019
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions src/CheckBox/__tests__/__snapshots__/CheckBox.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ exports[`<CheckBox /> should render without a problem 1`] = `
border-image-source: none;
border-image-width: 0;
padding: 0;
font-size: 1rem;
line-height: 1rem;
font-size: 10px;
line-height: 10px;
}

.c3 {
Expand Down Expand Up @@ -97,15 +97,15 @@ exports[`<CheckBox /> should render without a problem 1`] = `
<div
class="c5 c6"
data-testid="iconContainer"
height="1rem"
width="1rem"
height="10px"
width="10px"
>
<svg
data-testid="iconSvg"
height="1rem"
height="10px"
style="display: block;"
viewBox="0 0 512 512"
width="1rem"
width="10px"
xmlns="http://www.w3.org/2000/svg"
>
<path
Expand Down
2 changes: 1 addition & 1 deletion src/CheckBox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class CheckBox extends PureComponent {
value={value}
/>
<StyledCheckbox checked={checked} data-testid="styled-checkBox">
<Icon name="check-mark" color={Theme.palette.white} width="1rem" height="1rem" />
<Icon name="check-mark" color={Theme.palette.white} width="10px" height="10px" />
</StyledCheckbox>
{children}
</Label>
Expand Down
36 changes: 18 additions & 18 deletions src/Input/Status/__tests__/__snapshots__/status.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ exports[`<Status /> should have different color on icon 1`] = `
border-image-source: none;
border-image-width: 0;
padding: 0;
font-size: 2rem;
line-height: 2rem;
font-size: 20px;
line-height: 20px;
-webkit-animation: iVXCSc 3s linear infinite;
animation: iVXCSc 3s linear infinite;
}
Expand Down Expand Up @@ -39,15 +39,15 @@ exports[`<Status /> should have different color on icon 1`] = `
<div
class="c1"
data-testid="iconContainer"
height="2rem"
width="2rem"
height="20px"
width="20px"
>
<svg
data-testid="iconSvg"
height="2rem"
height="20px"
style="display: block;"
viewBox="0 0 512 512"
width="2rem"
width="20px"
xmlns="http://www.w3.org/2000/svg"
>
<path
Expand All @@ -67,8 +67,8 @@ exports[`<Status /> should have different width and height on icon 1`] = `
border-image-source: none;
border-image-width: 0;
padding: 0;
font-size: 1.1rem;
line-height: 1.1rem;
font-size: 11px;
line-height: 11px;
}

.c0 {
Expand Down Expand Up @@ -98,15 +98,15 @@ exports[`<Status /> should have different width and height on icon 1`] = `
<div
class="c1"
data-testid="iconContainer"
height="1.1rem"
width="1.1rem"
height="11px"
width="11px"
>
<svg
data-testid="iconSvg"
height="1.1rem"
height="11px"
style="display: block;"
viewBox="0 0 512 512"
width="1.1rem"
width="11px"
xmlns="http://www.w3.org/2000/svg"
>
<path
Expand All @@ -126,8 +126,8 @@ exports[`<Status /> should render without a problem 1`] = `
border-image-source: none;
border-image-width: 0;
padding: 0;
font-size: 2rem;
line-height: 2rem;
font-size: 20px;
line-height: 20px;
}

.c0 {
Expand Down Expand Up @@ -157,15 +157,15 @@ exports[`<Status /> should render without a problem 1`] = `
<div
class="c1"
data-testid="iconContainer"
height="2rem"
width="2rem"
height="20px"
width="20px"
>
<svg
data-testid="iconSvg"
height="2rem"
height="20px"
style="display: block;"
viewBox="0 0 512 512"
width="2rem"
width="20px"
xmlns="http://www.w3.org/2000/svg"
>
<path
Expand Down
4 changes: 2 additions & 2 deletions src/Input/Status/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const Status = ({ className, status }) => (
<Icon
color={status === 'loading' ? Theme.palette.primary.default : Theme.palette.white}
name={statusToIconName[status]}
width={['loading', 'info', 'warning'].includes(status) ? '2rem' : '1.1rem'}
height={['loading', 'info', 'warning'].includes(status) ? '2rem' : '1.1rem'}
width={['loading', 'info', 'warning'].includes(status) ? '20px' : '11px'}
height={['loading', 'info', 'warning'].includes(status) ? '20px' : '11px'}
spin={status === 'loading'}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ exports[`<TextInput /> should render search status input without problem when fo
border-image-source: none;
border-image-width: 0;
padding: 0;
font-size: 1.1rem;
line-height: 1.1rem;
font-size: 11px;
line-height: 11px;
}

.c2 {
Expand Down Expand Up @@ -461,15 +461,15 @@ exports[`<TextInput /> should render search status input without problem when fo
<div
class="c3"
data-testid="iconContainer"
height="1.1rem"
width="1.1rem"
height="11px"
width="11px"
>
<svg
data-testid="iconSvg"
height="1.1rem"
height="11px"
style="display: block;"
viewBox="0 0 512 512"
width="1.1rem"
width="11px"
xmlns="http://www.w3.org/2000/svg"
>
<path
Expand Down