Skip to content

Commit 610e232

Browse files
committed
feat(checkbox): right align w/ .item-checkbox-right
Closes #1290
1 parent fab4a41 commit 610e232

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Diff for: scss/_checkbox.scss

+11
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,14 @@ input:checked + .checkbox-icon:after {
130130
z-index: $z-index-item-checkbox;
131131
margin-top: (($checkbox-height + ($checkbox-height / 2)) / 2) * -1;
132132
}
133+
134+
135+
.item-checkbox.item-checkbox-right {
136+
padding-right: ($item-padding * 2) + $checkbox-width;
137+
padding-left: $item-padding;
138+
}
139+
140+
.item-checkbox-right .checkbox input,
141+
.item-checkbox-right .checkbox-icon {
142+
float: right;
143+
}

Diff for: test/css/input-checkbox.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h1 class="title">Input: Checkbox</h1>
1212
</header>
1313

1414
<main class="content has-header">
15-
15+
1616
<ul class="list">
1717
<li class="item item-checkbox">
1818
<label class="checkbox">
@@ -38,6 +38,12 @@ <h1 class="title">Input: Checkbox</h1>
3838
</label>
3939
Plutonium Resupply
4040
</li>
41+
<li class="item item-checkbox item-checkbox-right">
42+
<label class="checkbox">
43+
<input type="checkbox">
44+
</label>
45+
Right side checkbox
46+
</li>
4147
</ul>
4248

4349
<div class="padding">

0 commit comments

Comments
 (0)