Skip to content

Commit

Permalink
Merge pull request #153 from vrk-kpa/bugfix/icon-positioning
Browse files Browse the repository at this point in the history
Bugfix/Simplify icon positioning - closes #148
  • Loading branch information
J-Kallunki authored Sep 18, 2019
2 parents 6bbc28f + 6a73f9e commit 10efe29
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 26 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"test:tslint": "tslint --project tsconfig.json 'src/**/*.tsx'",
"test:eslint": "eslint --config .eslintrc src/**/*.tsx",
"test:stylelint": "stylelint ./src/**/*.{ts,tsx}",
"prettier": "prettier --write 'src/**/*.{js,jsx,ts,tsx,json,css,scss,md}'",
"prettier:check": "prettier-check 'src/**/*.{js,jsx,ts,tsx,json,css,scss,md}'",
"prettier": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
"prettier:check": "prettier-check \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
"validate": "npm-run-all test test:lint prettier:check",
"prebuild": "rimraf dist",
"build": "npm-run-all build:umd build:es2015 build:esm copyassets",
Expand Down
3 changes: 0 additions & 3 deletions src/core/Breadcrumb/__snapshots__/Breadcrumb.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ exports[`calling render with the same component on the same container does not r
.c6 {
display: inline-block;
vertical-align: baseline;
-webkit-transform: translateY(0.1em);
-ms-transform: translateY(0.1em);
transform: translateY(0.1em);
}
.c4 {
Expand Down
2 changes: 1 addition & 1 deletion src/core/Form/SearchInput/SearchInput.baseStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const baseStyles = ({ theme = suomifiTheme }: SearchInputProps) => css`
position: absolute;
top: 50%;
right: ${theme.spacing.m};
margin-top: -0.6em;
margin-top: -0.5em;
}
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@ exports[`calling render with the same component on the same container does not r
.c7 {
display: inline-block;
vertical-align: baseline;
-webkit-transform: translateY(0.1em);
-ms-transform: translateY(0.1em);
transform: translateY(0.1em);
}
.c0 .fi-search-input_input-container {
Expand All @@ -200,7 +197,7 @@ exports[`calling render with the same component on the same container does not r
position: absolute;
top: 50%;
right: 16px;
margin-top: -0.6em;
margin-top: -0.5em;
}
<label
Expand Down
3 changes: 0 additions & 3 deletions src/core/Form/Toggle/__snapshots__/Toggle.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ exports[`calling render with the same component on the same container does not r
.c4 {
display: inline-block;
vertical-align: baseline;
-webkit-transform: translateY(0.1em);
-ms-transform: translateY(0.1em);
transform: translateY(0.1em);
cursor: pointer;
}
Expand Down
1 change: 0 additions & 1 deletion src/core/Icon/Icon.baseStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const iconBaseStyles = ({
}: SuomifiIconProps) => css`
display: inline-block;
vertical-align: baseline;
transform: translateY(0.1em);
${!!mousePointer &&
`cursor: pointer;
& * {
Expand Down
3 changes: 0 additions & 3 deletions src/core/Icon/__snapshots__/Icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ exports[`calling render with the same component on the same container does not r
.c0 {
display: inline-block;
vertical-align: baseline;
-webkit-transform: translateY(0.1em);
-ms-transform: translateY(0.1em);
transform: translateY(0.1em);
}
<svg
Expand Down
1 change: 1 addition & 0 deletions src/core/Link/Link.baseStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ export const baseStyles = ({ theme = suomifiTheme }: LinkProps) => css`
export const externalStyles = ({ theme = suomifiTheme }: LinkProps) => css`
& .fi-link_icon {
padding-left: ${theme.spacing.xs};
transform: translateY(0.1em);
}
`;
6 changes: 3 additions & 3 deletions src/core/Link/__snapshots__/LinkExternal.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ exports[`calling render with the same component on the same container does not r
.c5 {
display: inline-block;
vertical-align: baseline;
-webkit-transform: translateY(0.1em);
-ms-transform: translateY(0.1em);
transform: translateY(0.1em);
}
.c3 {
Expand All @@ -80,6 +77,9 @@ exports[`calling render with the same component on the same container does not r
.c0 .fi-link_icon {
padding-left: 4px;
-webkit-transform: translateY(0.1em);
-ms-transform: translateY(0.1em);
transform: translateY(0.1em);
}
.c1 {
Expand Down
7 changes: 4 additions & 3 deletions src/core/Menu/Menu.baseStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ export const baseStyles = ({
border-radius: ${theme.radius.basic};
text-transform: uppercase;
& > .fi-menu-language_icon {
height: 16px;
width: 16px;
margin-left: ${theme.spacing.xxs};
height: 1.2em;
width: 1.2em;
transform: translateY(0.3em);
margin-left: ${theme.spacing.xs};
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/core/Panel/__snapshots__/PanelExpansion.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ exports[`calling render with the same component on the same container does not r
.c5 {
display: inline-block;
vertical-align: baseline;
-webkit-transform: translateY(0.1em);
-ms-transform: translateY(0.1em);
transform: translateY(0.1em);
}
.c0 {
Expand Down

0 comments on commit 10efe29

Please sign in to comment.