Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(input): improve use of placeholder and floating label
Browse files Browse the repository at this point in the history
Closes #1409.
  • Loading branch information
ThomasBurleson committed Feb 14, 2015
1 parent 42c2608 commit f704dda
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/components/icon/iconService.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@
}

/**
*
* Loads the file as XML and uses querySelector( <id> ) to find
* the desired node...
*/
function loadFromIconSet(id) {
var setName = id.substring(0, id.lastIndexOf(':')) || '$default';
Expand Down
18 changes: 13 additions & 5 deletions src/components/input/demoBasicUsage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@
<md-content class="md-padding">
<form name="userForm">

<md-input-container flex>
<label>Company (Disabled)</label>
<input ng-model="user.company" disabled>
</md-input-container>

<div layout layout-sm="column">
<md-input-container style="width:80%">
<label>Company (Disabled)</label>
<input ng-model="user.company" disabled>
</md-input-container>

<md-input-container flex>
<label>Submission Date</label>
<input type="date" ng-model="user.submissionDate">
</md-input-container>
</div>

<div layout layout-sm="column">
<md-input-container flex>
<label>First Name</label>
Expand Down Expand Up @@ -55,6 +62,7 @@
<textarea ng-model="user.biography" columns="1" md-maxlength="150"></textarea>
</md-input-container>


</form>
</md-content>

Expand Down
5 changes: 5 additions & 0 deletions src/components/input/input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ md-input-container {
opacity: 0;
}

&:not( .md-input-has-value ) input:not( :focus ) {
color: transparent;
}


/*
* The .md-input class is added to the input/textarea
*/
Expand Down

0 comments on commit f704dda

Please sign in to comment.