-
Notifications
You must be signed in to change notification settings - Fork 11
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(button): Patch for IE 11 helpkit-ember buttons #134
Conversation
{{else}} | ||
<span class="icon-holder"> | ||
{{nucleus-icon name=icon size=_iconSize}} | ||
</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor this piece of code such that there's only one nucleus-icon invocation. Perhaps always have the span class icon-holder with an optional .active
class based on iconOnly
property.
@@ -37,6 +37,11 @@ $active-box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, .25); | |||
height: 32px; | |||
min-width: 80px; | |||
|
|||
& .icon-holder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow BEM conventions.
http://getbem.com/naming/
@@ -37,6 +37,11 @@ $active-box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, .25); | |||
height: 32px; | |||
min-width: 80px; | |||
|
|||
& .nucleus-button__icon.active { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.nucleus-button
is redundant. Check how this can be simplified using SCSS.
@@ -1,4 +1,8 @@ | |||
{{#if icon}}{{nucleus-icon name=icon size=_iconSize}}{{/if}} | |||
{{#if icon}} | |||
<span class="nucleus-button__icon {{unless iconOnly "active"}}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A class named active
is quite common and the consuming apps might override our styles. So can we make this class a little more nucleus specific?
This is a quick fix to patch the buttons appearance wrt to icons and on IE 11.
Changes:
nucleus-button__icon
that enforces a top value to make the icon aligned with text. (Happens only for non-iconOnly buttons)