Skip to content

Commit

Permalink
fix(buttons): replace svg with inline svg
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan committed May 25, 2017
1 parent 276e6a3 commit 60cb29e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
7 changes: 6 additions & 1 deletion src/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,19 @@
$brand-01, // border-color
$brand-01, // font-color
$brand-01, // hover-bg-color
currentColor // icon-color
$brand-01 // icon-color
);

&:hover,
&:focus {
color: $inverse-01;
}

&:hover > .bx--btn__icon,
&:focus > .bx--btn__icon {
fill: $inverse-01;
}

&:hover:disabled,
&:focus:disabled {
color: $brand-01;
Expand Down
2 changes: 2 additions & 0 deletions src/components/button/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
width: rem(16px);
height: rem(16px);
margin-left: .5rem;
transition-duration: $transition--base;
transition-timing-function: ease-in;
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/components/button/danger-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<button class="bx--btn bx--btn--danger" type="button" disabled>Danger button</button>
<button class="bx--btn bx--btn--danger" type="button">
Danger
<svg class="bx--btn__icon">
<use xlink:href="/carbon-icons/bluemix-icons.svg#icon--add--glyph"></use>
<svg class="bx--btn__icon" width="16" height="16" viewBox="0 0 16 16" fill-rule="evenodd">
<path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm4 9H9v3H7V9H4V7h3V4h2v3h3v2z"></path>
</svg>
</button>
<button class="bx--btn bx--btn--danger bx--btn--sm" type="button">Danger button</button>
<button class="bx--btn bx--btn--danger bx--btn--sm" type="button">
Danger button
<svg class="bx--btn__icon">
<use xlink:href="/carbon-icons/bluemix-icons.svg#icon--add--glyph"></use>
<svg class="bx--btn__icon" width="16" height="16" viewBox="0 0 16 16" fill-rule="evenodd">
<path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm4 9H9v3H7V9H4V7h3V4h2v3h3v2z"></path>
</svg>
</button>
8 changes: 4 additions & 4 deletions src/components/button/primary-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<button class="bx--btn bx--btn--primary" type="button" disabled>Primary button</button>
<button class="bx--btn bx--btn--primary" type="button">
Primary
<svg class="bx--btn__icon">
<use xlink:href="/carbon-icons/bluemix-icons.svg#icon--add--glyph"></use>
<svg class="bx--btn__icon" width="16" height="16" viewBox="0 0 16 16" fill-rule="evenodd">
<path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm4 9H9v3H7V9H4V7h3V4h2v3h3v2z"></path>
</svg>
</button>
<button class="bx--btn bx--btn--primary bx--btn--sm" type="button">Primary button</button>
<button class="bx--btn bx--btn--primary bx--btn--sm" type="button">
Primary button
<svg class="bx--btn__icon">
<use xlink:href="/carbon-icons/bluemix-icons.svg#icon--add--glyph"></use>
<svg class="bx--btn__icon" width="16" height="16" viewBox="0 0 16 16" fill-rule="evenodd">
<path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm4 9H9v3H7V9H4V7h3V4h2v3h3v2z"></path>
</svg>
</button>
8 changes: 4 additions & 4 deletions src/components/button/secondary-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<button class="bx--btn bx--btn--secondary" type="button" disabled>Secondary button</button>
<button class="bx--btn bx--btn--secondary" type="button">
Secondary
<svg class="bx--btn__icon">
<use xlink:href="/carbon-icons/bluemix-icons.svg#icon--add--glyph"></use>
<svg class="bx--btn__icon" width="16" height="16" viewBox="0 0 16 16" fill-rule="evenodd">
<path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm4 9H9v3H7V9H4V7h3V4h2v3h3v2z"></path>
</svg>
</button>
<button class="bx--btn bx--btn--secondary bx--btn--sm" type="button">Secondary button</button>
<button class="bx--btn bx--btn--secondary bx--btn--sm" type="button">
Secondary button
<svg class="bx--btn__icon">
<use xlink:href="/carbon-icons/bluemix-icons.svg#icon--add--glyph"></use>
<svg class="bx--btn__icon" width="16" height="16" viewBox="0 0 16 16" fill-rule="evenodd">
<path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm4 9H9v3H7V9H4V7h3V4h2v3h3v2z"></path>
</svg>
</button>

0 comments on commit 60cb29e

Please sign in to comment.