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(buttons): replace svg with inline svg #120

Merged
merged 1 commit into from
May 25, 2017
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
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>