Skip to content

Commit 546a39b

Browse files
committed
refactor: simplify Radios input CSS
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent 4e468e3 commit 546a39b

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

css/styles.css

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -421,40 +421,46 @@ input.submit_button:focus {
421421
border: 2px solid #727272;
422422
}
423423

424-
.formcreator_radios .form-group-radio {
424+
.formcreator_form div.radio {
425+
padding: 3.7px 0;
426+
}
427+
.formcreator_form div.radio label {
428+
cursor: pointer;
429+
}
430+
.radios .form-group-radio {
425431
position: relative;
426432
display: inline-block;
427433
width: 16px;
428434
height: 16px;
429435
}
430-
.formcreator_radios .form-group-radio + label {
436+
.radios .form-group-radio + label {
431437
margin-left: 7px;
432438
}
433-
.formcreator_radios input[type = radio] {
439+
input[type = radio] {
434440
display: none;
435441
}
436-
.formcreator_radios .radio {
442+
.label-radio .radio {
437443
padding: 2px 0;
438444
}
439-
.formcreator_radios input[type = radio] + label.label-radio span {
445+
input[type = radio] + label.label-radio span {
440446
display: inline-block;
441447
position: absolute;
442448
width: 16px;
443449
height: 16px;
444450
}
445-
.formcreator_radios input[type = radio] + label.label-radio .box {
451+
input[type = radio] + label.label-radio .box {
446452
background-color: #fff;
447453
border: 2px solid #727272;
448454
border-radius: 50%;
449455
}
450-
.formcreator_radios input[type = radio] + label.label-radio .check {
456+
input[type = radio] + label.label-radio .check {
451457
left: 4px;
452458
top: 4px;
453459
width: 0px;
454460
height: 0px;
455461
opacity: 0;
456462
}
457-
.formcreator_radios input[type = radio]:checked + label.label-radio .check {
463+
input[type = radio]:checked + label.label-radio .check {
458464
border: 6px solid #727272;
459465
border-radius: 50%;
460466
transition: opacity 0.3s ease;

inc/fields/radiosfield.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function getRenderedHtml($canEdit = true) {
121121
$html .= '<span class="check"></span>';
122122
$html .= '</label>';
123123
$html .= '</span>';
124-
$html .= '<label class="label-radio" title="' . $value . '" for="' . $domId . '_' . $i . '">';
124+
$html .= '<label for="' . $domId . '_' . $i . '">';
125125
$html .= $value;
126126
$html .= '</label>';
127127
$html .= '</div>';

0 commit comments

Comments
 (0)