Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update example of a single checkbox to use the new style #394

Merged
merged 2 commits into from
Feb 20, 2017
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
12 changes: 5 additions & 7 deletions app/views/guide_form_elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,21 +234,19 @@ <h4 class="heading-small">Stacked checkboxes</h4>
</code>
</pre>

<h4 class="heading-small">Inline checkboxes</h4>
<ul class="list list-bullet text">
<li>large hit areas aren’t always appropriate</li>
<li>only pre-select options if there’s a strong, user-centred reason to</li>
</ul>
<p>
Only pre-select options if there’s a strong, user-centred reason to.
</p>

<div class="example">
<form>
{% include "snippets/form_checkbox_native.html" %}
{% include "snippets/form_checkbox.html" %}
</form>
</div>

<pre>
<code class="language-markup">
{% include "snippets/encoded/form_checkbox_native.html" %}
{% include "snippets/encoded/form_checkbox.html" %}
</code>
</pre>

Expand Down
8 changes: 8 additions & 0 deletions app/views/snippets/form_checkbox.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="form-group">
<label class="form-label" for="telephone-number">Enter your telephone number</label>
<input class="form-control" id="telephone-number" name="telephone-number" type="text">
</div>
<label class="block-label selection-button-checkbox" for="checkbox-telephone-number">
<input id="checkbox-telephone-number" name="contact-by-text-phone" type="checkbox" value="true">
I need to be contacted using a text phone
</label>
6 changes: 0 additions & 6 deletions app/views/snippets/form_checkbox_native.html

This file was deleted.

22 changes: 0 additions & 22 deletions public/sass/elements/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -169,28 +169,6 @@ textarea.form-control {
}
// scss-lint:enable QualifyingElement

// Radio buttons
.form-radio {
display: block;
margin: 10px 0;

input {
vertical-align: middle;
margin: -4px 5px 0 0;
}
}

// Checkboxes
.form-checkbox {
display: block;
margin: $gutter-half 0;

input {
vertical-align: middle;
margin: -2px 5px 0 0;
}
}


// 6. Form control widths
// ==========================================================================
Expand Down