Closed robertknight closed 9 years ago
The animations are working on mobile but the Polymer ones are smoother. Couple of things I notice from their code: 1) They are animating via translate3d() and scale3d() transforms rather than animating the font size and width. 2) They cache the transform for a field just before applying it for the first time. I don't know how important that is.
Wow, animating from the mousedown position makes a ton of difference for this animation (certain others do this always from the center position). Looks nice!
em
, for now it's rather unclear where all the elements end up - and that could have unpredictable consequences. I would prefer to use rem
with a fallback to px
(IE8, although not TOO important). Also using constants could help with making it simpler.styles={{this.props.styles, somethingElse.styles]}
which would solve the theming issues. Could be something for after the upcoming 0.4 release of React Style.PR looks like a good improvement, further improvements can be build upon this code.
FYI. the upcoming react-style 0.4 will drop support for pseudo-classes, which is explained here: https://github.com/js-next/react-style/blob/0.4/CHANGES.md.
This brings the implementation of the text field component closer to the Polymer Paper elements version:
I have a few general questions/thoughts:
<paper-input>
control.props.theme
.