-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix top margin of validation messages
- Loading branch information
Showing
5 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
templates/docs/examples/patterns/forms/form-help-text-dense.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% extends "_layouts/examples.html" %} | ||
{% block title %}Forms / Help text / Dense{% endblock %} | ||
|
||
{% block standalone_css %}patterns_forms{% endblock %} | ||
|
||
{% block content %} | ||
<form> | ||
<label for="exampleTextInputHelp">Email address</label> | ||
<input class="p-form-validation__input is-dense" type="email" id="exampleTextInputHelp" placeholder="[email protected]" name="exampleTextInputHelp" autocomplete="email" aria-describedby="exampleInputHelpMessage"/> | ||
<p class="p-form-help-text" id="exampleInputHelpMessage"> | ||
A notification email will be sent to entered email address. | ||
</p> | ||
</form> | ||
{% endblock %} |
47 changes: 47 additions & 0 deletions
47
templates/docs/examples/patterns/forms/form-validation-dense.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{% extends "_layouts/examples.html" %} | ||
{% block title %}Forms / Validation / Dense{% endblock %} | ||
|
||
{% block standalone_css %}patterns_forms{% endblock %} | ||
|
||
{% block content %} | ||
<form> | ||
<div class="p-form-validation is-error"> | ||
<label for="exampleTextInputError">Email address</label> | ||
<input class="p-form-validation__input is-dense" type="email" id="exampleTextInputError" | ||
placeholder="[email protected]" name="exampleTextInputError" autocomplete="email" aria-invalid="true" | ||
aria-describedby="exampleInputErrorMessage"/> | ||
<p class="p-form-validation__message" id="exampleInputErrorMessage">This field is required.</p> | ||
</div> | ||
|
||
<div class="p-form-validation is-caution"> | ||
<label for="exampleTextInputCaution">Mail configuration ID</label> | ||
<input class="p-form-validation__input is-dense" type="text" id="exampleTextInputCaution" placeholder="14" | ||
name="exampleTextInputCaution" autocomplete="on" aria-describedby="exampleInputCautionMessage"/> | ||
<p class="p-form-validation__message" id="exampleInputCautionMessage">No validation is performed in preview | ||
mode.</p> | ||
</div> | ||
|
||
<div class="p-form-validation is-success"> | ||
<label for="exampleTextInputSuccess">Card number</label> | ||
<input class="p-form-validation__input is-dense" type="text" id="exampleTextInputSuccess" | ||
placeholder="**** **** **** ****" name="exampleTextInputSuccess" autocomplete="off" | ||
aria-describedby="exampleInputSuccessMessage"/> | ||
<p class="p-form-validation__message" id="exampleInputSuccessMessage">Verified.</p> | ||
</div> | ||
|
||
<div class="p-form-validation is-error"> | ||
<label for="exampleSelectInputError">Ubuntu releases</label> | ||
<div class="p-form-validation__select-wrapper is-dense"> | ||
<select class="p-form-validation__input is-dense" id="exampleSelectInputError" name="exampleSelectInputError" | ||
aria-invalid="true" aria-describedby="exampleSelectErrorMessage"> | ||
<option value="">--Select an option--</option> | ||
<option value="1">Cosmic Cuttlefish</option> | ||
<option value="2">Bionic Beaver</option> | ||
<option value="3">Xenial Xerus</option> | ||
</select> | ||
</div> | ||
<p class="p-form-validation__message" id="exampleSelectErrorMessage">You need to select an OS to complete your | ||
install.</p> | ||
</div> | ||
</form> | ||
{% endblock %} |