Skip to content

Commit

Permalink
Merge pull request #1 from chrismcv/floating-label-on-text-field
Browse files Browse the repository at this point in the history
Make floating label text crisper when floating
  • Loading branch information
chrismcv committed Jun 3, 2015
2 parents b2b4a76 + 4857e24 commit 30478f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/text-field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ var TextField = React.createClass({

if (this.state.isFocused) {
styles.floatingLabel.color = this.getTheme().primary1Color;
styles.floatingLabel.transform = 'scale(0.75) translate3d(0, -18px, 0)';
styles.floatingLabel.transform = 'perspective(1px) scale(0.75) translate3d(0, -18px, 0)';
styles.focusUnderline.transform = 'scaleX(1)';
}

if (this.state.hasValue) {
styles.floatingLabel.color = ColorManipulator.fade(this.getTheme().textColor, 0.5);
styles.floatingLabel.transform = 'scale(0.75) translate3d(0, -18px, 0)';
styles.floatingLabel.transform = 'perspective(1px) scale(0.75) translate3d(0, -18px, 0)';
styles.hint.opacity = 0;
}

Expand Down

0 comments on commit 30478f2

Please sign in to comment.