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

Bugfix/Simplify icon positioning - closes #148 #153

Merged
merged 4 commits into from
Sep 18, 2019
Merged
Show file tree
Hide file tree
Changes from 3 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
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;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a minor size adjustment to make the element look closer to the design.

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