Skip to content

Commit 4035d60

Browse files
Merge pull request #2157 from nextcloud/fix-checkboxes
Fix checkboxes when theming color is enabled
2 parents 8f38ada + beeb819 commit 4035d60

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

apps/theming/lib/Controller/ThemingController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ public function getStylesheet() {
319319
$responseCss .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
320320
'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
321321
'background-color: %s; background-position: center center; background-size:contain;' .
322-
'width:12px; height:12px; padding:0; margin:2px 6px 6px 9px; border-radius:1px;' .
322+
'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
323323
"}\n",
324324
\OC::$WEBROOT,
325325
$elementColor

apps/theming/tests/Controller/ThemingControllerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ public function testGetStylesheetWithOnlyColor() {
428428
$expectedData .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
429429
'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
430430
'background-color: %s; background-position: center center; background-size:contain;' .
431-
'width:12px; height:12px; padding:0; margin:2px 6px 6px 9px; border-radius:1px;' .
431+
'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
432432
"}\n",
433433
\OC::$WEBROOT,
434434
$color
@@ -517,7 +517,7 @@ public function testGetStylesheetWithOnlyColorInvert() {
517517
$expectedData .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
518518
'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
519519
'background-color: #555555; background-position: center center; background-size:contain;' .
520-
'width:12px; height:12px; padding:0; margin:2px 6px 6px 9px; border-radius:1px;' .
520+
'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
521521
"}\n",
522522
\OC::$WEBROOT
523523
);
@@ -691,7 +691,7 @@ public function testGetStylesheetWithAllCombined() {
691691
$expectedData .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
692692
'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
693693
'background-color: %s; background-position: center center; background-size:contain;' .
694-
'width:12px; height:12px; padding:0; margin:2px 6px 6px 9px; border-radius:1px;' .
694+
'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
695695
"}\n",
696696
\OC::$WEBROOT,
697697
$color
@@ -797,7 +797,7 @@ public function testGetStylesheetWithAllCombinedInverted() {
797797
$expectedData .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
798798
'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
799799
'background-color: #555555; background-position: center center; background-size:contain;' .
800-
'width:12px; height:12px; padding:0; margin:2px 6px 6px 9px; border-radius:1px;' .
800+
'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
801801
"}\n",
802802
\OC::$WEBROOT
803803
);

core/css/multiselect.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ ul.multiselectoptions.up {
3131
ul.multiselectoptions>li {
3232
overflow: hidden;
3333
white-space: nowrap;
34-
}
35-
36-
ul.multiselectoptions > li > input[type="checkbox"]+label:before {
3734
margin-left: 7px;
3835
}
3936
ul.multiselectoptions > li input[type='checkbox']+label {
@@ -106,6 +103,7 @@ ul.multiselectoptions input.new {
106103

107104
ul.multiselectoptions > li.creator {
108105
padding: 10px;
106+
margin: 0;
109107
font-weight: bold;
110108
}
111109
ul.multiselectoptions > li.creator > input {

0 commit comments

Comments
 (0)