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

Commit f704dda

Browse files
fix(input): improve use of placeholder and floating label
Closes #1409.
1 parent 42c2608 commit f704dda

3 files changed

Lines changed: 20 additions & 6 deletions

File tree

src/components/icon/iconService.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@
315315
}
316316

317317
/**
318-
*
318+
* Loads the file as XML and uses querySelector( <id> ) to find
319+
* the desired node...
319320
*/
320321
function loadFromIconSet(id) {
321322
var setName = id.substring(0, id.lastIndexOf(':')) || '$default';

src/components/input/demoBasicUsage/index.html

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,18 @@
1414
<md-content class="md-padding">
1515
<form name="userForm">
1616

17-
<md-input-container flex>
18-
<label>Company (Disabled)</label>
19-
<input ng-model="user.company" disabled>
20-
</md-input-container>
21-
17+
<div layout layout-sm="column">
18+
<md-input-container style="width:80%">
19+
<label>Company (Disabled)</label>
20+
<input ng-model="user.company" disabled>
21+
</md-input-container>
22+
23+
<md-input-container flex>
24+
<label>Submission Date</label>
25+
<input type="date" ng-model="user.submissionDate">
26+
</md-input-container>
27+
</div>
28+
2229
<div layout layout-sm="column">
2330
<md-input-container flex>
2431
<label>First Name</label>
@@ -55,6 +62,7 @@
5562
<textarea ng-model="user.biography" columns="1" md-maxlength="150"></textarea>
5663
</md-input-container>
5764

65+
5866
</form>
5967
</md-content>
6068

src/components/input/input.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ md-input-container {
7777
opacity: 0;
7878
}
7979

80+
&:not( .md-input-has-value ) input:not( :focus ) {
81+
color: transparent;
82+
}
83+
84+
8085
/*
8186
* The .md-input class is added to the input/textarea
8287
*/

0 commit comments

Comments
 (0)