Skip to content

Commit

Permalink
Merge pull request #144 from mhretab/master
Browse files Browse the repository at this point in the history
fixed icon size parameters and added 'md-sm'
  • Loading branch information
miguelcobain committed Aug 4, 2015
2 parents 2fb05fa + 312a1c2 commit fa97a6a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### 0.2.7 (Aug 04, 2015)
- [#132](https://github.com/miguelcobain/ember-paper/pull/132) Added autocomplete component.
- [#144](https://github.com/miguelcobain/ember-paper/pull/144) Fixed paper-icon sizes and added new size md-sm (size="sm").

### 0.2.6 (Jul 20, 2015)

Expand Down
2 changes: 2 additions & 0 deletions addon/components/paper-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export default Ember.Component.extend(ColorMixin, {
switch(this.get('size')) {
case 'lg':
return ' md-lg';
case 'sm':
return ' md-sm';
case 2:
return ' md-2x';
case 3:
Expand Down
37 changes: 26 additions & 11 deletions app/styles/paper-icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@ md-icon {
width: 3 * $baseline-grid;
line-height: 3 * $baseline-grid;
}
// Icon sizes
.md-lg {
font-size: 1.5em;
line-height: .5em;
vertical-align: -35%;
}
.md-2x { font-size: 2em; }
.md-3x { font-size: 3em; }
.md-4x { font-size: 4em; }
.md-5x { font-size: 5em; }
*/

// Icon spinners
Expand Down Expand Up @@ -2505,3 +2494,29 @@ md-icon.md-#{$theme-name}-theme {
content: "\e900"
}
}

// Icon sizes
.md-lg {
font-size: 1.5em;
}

.md-sm {
font-size: 1em;
}

.md-2x {
font-size: 2em;
}

.md-3x {
font-size: 3em;
}

.md-4x {
font-size: 4em;
}

.md-5x {
font-size: 5em;
}

17 changes: 10 additions & 7 deletions tests/dummy/app/templates/icons.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
<h3>Template</h3>
<h4>Basic Icons</h4>
{{#code-block language='handlebars'}}
\{{paper-icon icon="check"}}{{/code-block}}
<h4>Larger Icons</h4>
\{{paper-icon icon="check"}}
{{/code-block}}
<h4>Changing Sizes</h4>
{{#code-block language='handlebars'}}
\{{paper-icon icon="check" size="lg"}}
\{{paper-icon icon="check" size=2}}
\{{paper-icon icon="check" size=3}}
\{{paper-icon icon="check" size=4}}
\{{paper-icon icon="check" size=5}}{{/code-block}}
\{{paper-icon icon="check" size="sm"}}
\{{paper-icon icon="check" size="lg"}}
\{{paper-icon icon="check" size=2}}
\{{paper-icon icon="check" size=3}}
\{{paper-icon icon="check" size=4}}
\{{paper-icon icon="check" size=5}}
{{/code-block}}
<h4>Spinners</h4>
{{#code-block language='handlebars'}}
\{{paper-icon icon="rotate-right" spin=true}}
Expand Down

0 comments on commit fa97a6a

Please sign in to comment.