It turns out that MDL has a CSS class with "placement" that prohibits the display of labels for entering text fields with the placeholder attribute.
Setting the placeholder attribute for empty Google Maps stoplists from placing "Enter Location" in the text box, but the attribute causes MDL CSS to hide the label.
To fix this, I overridden the MDL CSS with a placeholder to capture visibility. For example, here is my MDL text box:
<div class="mdl-textfield mdl-js-textfield" id="location-textfield"> <input class="mdl-textfield__input" type="text" id="location-input" onFocus="geolocate()" placeholder=""> <label class="mdl-textfield__label" for="location" id="location-label">Location</label> </div>
And here is the CSS to capture the visibility:
#location-label { visibility: visible; } .is-dirty #location-label { visibility: hidden; }
source share