Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/index.html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,20 @@
<textarea id="text${getCurrentId()}" rows="8"></textarea>
</div>
`) %>

<p>
Text boxes can also be disabled and have value with their corresponding HTML attributes.
</p>

<%- example(`
<div class="field-row">
<label for="text${getNewId()}">Favorite color</label>
<input id="text${getCurrentId()}" disabled type="text" value="Windows Green"/>
</div>
`) %>
</div>


</section>

<section class="component">
Expand Down
11 changes: 11 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ button::-moz-focus-inner {
:disabled,
:disabled + label {
color: var(--button-shadow);
}

button:disabled,
:disabled + label {
text-shadow: 1px 1px 0 var(--button-highlight);
}

Expand Down Expand Up @@ -433,6 +437,13 @@ input[type="email"] {
line-height: 2;
}

input[type="email"]:disabled,
input[type="password"]:disabled,
input[type="text"]:disabled,
textarea:disabled {
background-color: var(--surface);
}

select {
appearance: none;
-webkit-appearance: none;
Expand Down