Skip to content

Commit

Permalink
feat: do not set button icon size - this gets handled by the icon itself
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Nov 26, 2018
1 parent bafd1fd commit baeee69
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/dnb-ui-lib/src/components/button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class Content extends PureComponent {
title: null,
content: null,
icon: null,
icon_size: DefaultIconSize
icon_size: null
}
render() {
const { text, title, content, icon, icon_size } = this.props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ exports[`Button scss have to match snapshot 1`] = `
/* Firefox includes a hidden border which messes up button dimensions */ }
.dnb-button__icon {
line-height: 0; }
.dnb-button__icon svg:not([width]):not([height]) {
.dnb-button__icon:not(.dnb-icon) svg:not([width]):not([height]) {
width: var(--button-icon-size);
height: var(--button-icon-size); }
.dnb-button__text {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

&__icon {
line-height: 0;
svg:not([width]):not([height]) {
&:not(.dnb-icon) svg:not([width]):not([height]) {
width: var(--button-icon-size);
height: var(--button-icon-size);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ body:not(:-moz-handler-blocked) fieldset {
/* Firefox includes a hidden border which messes up button dimensions */ }
.dnb-button__icon {
line-height: 0; }
.dnb-button__icon svg:not([width]):not([height]) {
.dnb-button__icon:not(.dnb-icon) svg:not([width]):not([height]) {
width: var(--button-icon-size);
height: var(--button-icon-size); }
.dnb-button__text {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ body:not(:-moz-handler-blocked) fieldset {
/* Firefox includes a hidden border which messes up button dimensions */ }
.dnb-button__icon {
line-height: 0; }
.dnb-button__icon svg:not([width]):not([height]) {
.dnb-button__icon:not(.dnb-icon) svg:not([width]):not([height]) {
width: var(--button-icon-size);
height: var(--button-icon-size); }
.dnb-button__text {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ body:not(:-moz-handler-blocked) fieldset {
/* Firefox includes a hidden border which messes up button dimensions */ }
.dnb-button__icon {
line-height: 0; }
.dnb-button__icon svg:not([width]):not([height]) {
.dnb-button__icon:not(.dnb-icon) svg:not([width]):not([height]) {
width: var(--button-icon-size);
height: var(--button-icon-size); }
.dnb-button__text {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ exports[`Modal scss have to match snapshot 1`] = `
/* Firefox includes a hidden border which messes up button dimensions */ }
.dnb-button__icon {
line-height: 0; }
.dnb-button__icon svg:not([width]):not([height]) {
.dnb-button__icon:not(.dnb-icon) svg:not([width]):not([height]) {
width: var(--button-icon-size);
height: var(--button-icon-size); }
.dnb-button__text {
Expand Down

0 comments on commit baeee69

Please sign in to comment.