Skip to content

Commit a254f59

Browse files
authored
fix(checkbox): remove old v1 checkbox box code
This PR delete the old code for v1 checkboxes that isn't even documented anymore. Since target 2.9 is a breaking change, I think that we can delete it before the 3.0 release safely.
1 parent 3eadf38 commit a254f59

File tree

4 files changed

+4
-159
lines changed

4 files changed

+4
-159
lines changed

src/definitions/collections/form.less

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -671,22 +671,16 @@
671671
Checkbox State
672672
---------------------*/
673673
.ui.form .fields.@{state} .field .checkbox:not(.toggle):not(.slider) label,
674-
.ui.form .field.@{state} .checkbox:not(.toggle):not(.slider) label,
675-
.ui.form .fields.@{state} .field .checkbox:not(.toggle):not(.slider) .box,
676-
.ui.form .field.@{state} .checkbox:not(.toggle):not(.slider) .box {
674+
.ui.form .field.@{state} .checkbox:not(.toggle):not(.slider) label {
677675
color: @c;
678676
}
679677
.ui.form .fields.@{state} .field .checkbox:not(.toggle):not(.slider) label:before,
680-
.ui.form .field.@{state} .checkbox:not(.toggle):not(.slider) label:before,
681-
.ui.form .fields.@{state} .field .checkbox:not(.toggle):not(.slider) .box:before,
682-
.ui.form .field.@{state} .checkbox:not(.toggle):not(.slider) .box:before {
678+
.ui.form .field.@{state} .checkbox:not(.toggle):not(.slider) label:before {
683679
background: @bg;
684680
border-color: @bdc;
685681
}
686682
.ui.form .fields.@{state} .field .checkbox label:after,
687-
.ui.form .field.@{state} .checkbox label:after,
688-
.ui.form .fields.@{state} .field .checkbox .box:after,
689-
.ui.form .field.@{state} .checkbox .box:after {
683+
.ui.form .field.@{state} .checkbox label:after {
690684
color: @c;
691685
}
692686

@@ -813,9 +807,7 @@
813807
.ui.inverted.form label,
814808
.ui.form .inverted.segment label,
815809
.ui.form .inverted.segment .ui.checkbox label,
816-
.ui.form .inverted.segment .ui.checkbox .box,
817810
.ui.inverted.form .ui.checkbox label,
818-
.ui.inverted.form .ui.checkbox .box,
819811
.ui.inverted.form .inline.fields > label,
820812
.ui.inverted.form .inline.fields .field > label,
821813
.ui.inverted.form .inline.fields .field > p,

src/definitions/modules/checkbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ $.fn.checkbox.settings = {
864864

865865
selector : {
866866
checkbox : '.ui.checkbox',
867-
label : 'label, .box',
867+
label : 'label',
868868
input : 'input[type="checkbox"], input[type="radio"]',
869869
link : 'a[href]'
870870
}

src/definitions/modules/checkbox.less

Lines changed: 0 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -55,126 +55,6 @@
5555
}
5656

5757

58-
& when (@variationCheckboxBox) {
59-
/*--------------
60-
Box
61-
---------------*/
62-
63-
/* .box selector is deprecated and will be removed in v3 */
64-
.ui.checkbox .box {
65-
&:extend(.ui.checkbox label all);
66-
}
67-
.ui.checkbox + .box {
68-
&:extend(.ui.checkbox + label all);
69-
}
70-
.ui.checkbox input:focus ~ .box {
71-
&:extend(.ui.checkbox input:focus ~ label all);
72-
}
73-
.ui.checkbox input:checked ~ .box {
74-
&:extend(.ui.checkbox input:checked ~ label all);
75-
}
76-
& when (@variationCheckboxIndeterminate) {
77-
.ui.checkbox input:not([type=radio]):indeterminate ~ .box {
78-
&:extend(.ui.checkbox input:not([type=radio]):indeterminate ~ label all);
79-
}
80-
.ui.checkbox input:not([type=radio]):indeterminate:focus ~ .box {
81-
&:extend(.ui.checkbox input:not([type=radio]):indeterminate:focus ~ label all);
82-
}
83-
}
84-
.ui.checkbox input:checked:focus ~ .box {
85-
&:extend(.ui.checkbox input:checked:focus ~ label all);
86-
}
87-
& when (@variationCheckboxDisabled) {
88-
.ui.disabled.checkbox .box {
89-
&:extend(.ui.disabled.checkbox label all);
90-
}
91-
92-
.ui.checkbox input[disabled] ~ .box {
93-
&:extend(.ui.checkbox input[disabled] ~ label all);
94-
}
95-
}
96-
& when (@variationCheckboxRadio) {
97-
.ui.radio.checkbox .box {
98-
&:extend(.ui.radio.checkbox label all);
99-
}
100-
.ui.radio.checkbox input:focus ~ .box {
101-
&:extend(.ui.radio.checkbox input:focus ~ label all);
102-
}
103-
.ui.radio.checkbox input:indeterminate ~ .box {
104-
&:extend(.ui.radio.checkbox input:indeterminate ~ label all);
105-
}
106-
.ui.radio.checkbox input:checked ~ .box {
107-
&:extend(.ui.radio.checkbox input:checked ~ label all);
108-
}
109-
.ui.radio.checkbox input:focus:checked ~ .box {
110-
&:extend(.ui.radio.checkbox input:focus:checked ~ label all);
111-
}
112-
}
113-
& when (@variationCheckboxSlider) {
114-
.ui.slider.checkbox .box {
115-
&:extend(.ui.slider.checkbox label all);
116-
}
117-
.ui.slider.checkbox input:focus ~ .box {
118-
&:extend(.ui.slider.checkbox input:focus ~ label all);
119-
}
120-
.ui.slider.checkbox input:checked ~ .box {
121-
&:extend(.ui.slider.checkbox input:checked ~ label all);
122-
}
123-
.ui.slider.checkbox input:focus:checked ~ .box {
124-
&:extend(.ui.slider.checkbox input:focus:checked ~ label all);
125-
}
126-
}
127-
& when (@variationCheckboxToggle) {
128-
.ui.toggle.checkbox .box {
129-
&:extend(.ui.toggle.checkbox label all);
130-
}
131-
.ui.toggle.checkbox input ~ .box {
132-
&:extend(.ui.toggle.checkbox input ~ label all);
133-
}
134-
.ui.toggle.checkbox input:focus ~ .box {
135-
&:extend(.ui.toggle.checkbox input:focus ~ label all);
136-
}
137-
.ui.toggle.checkbox input:checked ~ .box {
138-
&:extend(.ui.toggle.checkbox input:checked ~ label all);
139-
}
140-
.ui.toggle.checkbox input:focus:checked ~ .box {
141-
&:extend(.ui.toggle.checkbox input:focus:checked ~ label all);
142-
}
143-
}
144-
& when (@variationCheckboxFitted) {
145-
.ui.fitted.checkbox .box {
146-
&:extend(.ui.fitted.checkbox label all);
147-
}
148-
}
149-
& when (@variationCheckboxInverted) {
150-
.ui.inverted.checkbox .box {
151-
&:extend(.ui.inverted.checkbox label all);
152-
}
153-
& when (@variationCheckboxSlider) {
154-
.ui.inverted.slider.checkbox .box {
155-
&:extend(.ui.inverted.slider.checkbox label all);
156-
}
157-
.ui.inverted.slider.checkbox input:checked ~ .box {
158-
&:extend(.ui.inverted.slider.checkbox input:checked ~ label all);
159-
}
160-
.ui.inverted.slider.checkbox input:focus:checked ~ .box {
161-
&:extend(.ui.inverted.slider.checkbox input:focus:checked ~ label all);
162-
}
163-
}
164-
& when (@variationCheckboxToggle) {
165-
.ui.inverted.toggle.checkbox .box {
166-
&:extend(.ui.inverted.toggle.checkbox label all);
167-
}
168-
.ui.inverted.toggle.checkbox input:checked ~ .box {
169-
&:extend(.ui.inverted.toggle.checkbox input:checked ~ label all);
170-
}
171-
.ui.inverted.toggle.checkbox input:focus:checked ~ .box {
172-
&:extend(.ui.inverted.toggle.checkbox input:focus:checked ~ label all);
173-
}
174-
}
175-
}
176-
}
177-
17858
.ui.checkbox label {
17959
cursor: auto;
18060
position: relative;
@@ -833,32 +713,6 @@ each(@variationCheckboxSizes, {
833713
}
834714
}
835715
}
836-
& when (@@raw > 1) and (@variationCheckboxBox) {
837-
.ui.@{value}.form .checkbox,
838-
.ui.@{value}.checkbox {
839-
&:not(.slider):not(.toggle):not(.radio) {
840-
&
841-
.box:after,
842-
.box:before {
843-
transform: scale(@@raw);
844-
transform-origin:left;
845-
}
846-
}
847-
&.radio when (@variationCheckboxRadio) {
848-
&
849-
.box:before {
850-
transform: scale(@@raw);
851-
transform-origin:left;
852-
}
853-
&
854-
.box:after {
855-
transform:scale(@@circleScale);
856-
transform-origin:left;
857-
left: @@circleLeft;
858-
}
859-
}
860-
}
861-
}
862716
})
863717

864718
.loadUIOverrides();

src/themes/default/globals/variation.variables

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@
383383
@variationCalendarDisabled: true;
384384

385385
/* Checkbox */
386-
@variationCheckboxBox: false; //.box (instead of label) is an ancient fragment of sui v1 and not even documented in v2.x anymore
387386
@variationCheckboxDisabled: true;
388387
@variationCheckboxReadonly: true;
389388
@variationCheckboxInverted: true;

0 commit comments

Comments
 (0)