-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat(icons): add support for font-icons using ligatures #3059
Conversation
@robertmesserle, @jelbourn - ready for your review. |
var names = attrValue('mdFontLibrary') + ' ' + attrValue('class'); | ||
element.attr('class',names.trim()); | ||
|
||
return $interpolate( tmpl )({ classNames: names.trim() }); |
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.
Using $interpolate here seems a bit like overkill - why not just include names.trim()
in the original template string?
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.
At one point, the tokenized requirements were more complicated. I will adjust L151.
@ThomasBurleson LGTM, just made some minor comments. |
…con demos Closes #3059.
382896b
to
a107490
Compare
<div ng-controller="DemoCtrl" ng-cloak > | ||
|
||
<p> | ||
Display 4 Material Design font-icons using ligatures [instead of CSS names]; each with different sizes and colors<br/> |
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.
Why does a <p>
end with a <br>
?
Hi, I cant seem to get the icon visible inside a button. |
Looks like @ThomasBurleson I'm going to ask the Fonts team to make a change to the served CSS. Might take a day or two. |
OK, Fonts team just submitted a CL with the fix. I've asked them to expedite a push to prod. |
@MigFerreira Try your demo again. Should work properly. |
@shyndman Thanks for fast action, looking great! |
Thx @shyndman. .md-button {
letter-spacing: 0.010em;
} |
@ThomasBurleson it was for the "tracking" section in the Typography spec (aka letter-spacing): https://www.google.com/design/spec/style/typography.html#typography-other-typographic-guidelines |
Support for
md-font-library=""
attributeImproved documentation
Extra demo using Material Design icons.