Skip to content

Commit

Permalink
Merge pull request #2157 from nextcloud/fix-checkboxes
Browse files Browse the repository at this point in the history
Fix checkboxes when theming color is enabled
  • Loading branch information
nickvergessen authored Nov 16, 2016
2 parents 8f38ada + beeb819 commit 4035d60
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apps/theming/lib/Controller/ThemingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public function getStylesheet() {
$responseCss .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
'background-color: %s; background-position: center center; background-size:contain;' .
'width:12px; height:12px; padding:0; margin:2px 6px 6px 9px; border-radius:1px;' .
'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
"}\n",
\OC::$WEBROOT,
$elementColor
Expand Down
8 changes: 4 additions & 4 deletions apps/theming/tests/Controller/ThemingControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public function testGetStylesheetWithOnlyColor() {
$expectedData .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
'background-color: %s; background-position: center center; background-size:contain;' .
'width:12px; height:12px; padding:0; margin:2px 6px 6px 9px; border-radius:1px;' .
'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
"}\n",
\OC::$WEBROOT,
$color
Expand Down Expand Up @@ -517,7 +517,7 @@ public function testGetStylesheetWithOnlyColorInvert() {
$expectedData .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
'background-color: #555555; background-position: center center; background-size:contain;' .
'width:12px; height:12px; padding:0; margin:2px 6px 6px 9px; border-radius:1px;' .
'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
"}\n",
\OC::$WEBROOT
);
Expand Down Expand Up @@ -691,7 +691,7 @@ public function testGetStylesheetWithAllCombined() {
$expectedData .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
'background-color: %s; background-position: center center; background-size:contain;' .
'width:12px; height:12px; padding:0; margin:2px 6px 6px 9px; border-radius:1px;' .
'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
"}\n",
\OC::$WEBROOT,
$color
Expand Down Expand Up @@ -797,7 +797,7 @@ public function testGetStylesheetWithAllCombinedInverted() {
$expectedData .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
'background-color: #555555; background-position: center center; background-size:contain;' .
'width:12px; height:12px; padding:0; margin:2px 6px 6px 9px; border-radius:1px;' .
'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
"}\n",
\OC::$WEBROOT
);
Expand Down
4 changes: 1 addition & 3 deletions core/css/multiselect.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ ul.multiselectoptions.up {
ul.multiselectoptions>li {
overflow: hidden;
white-space: nowrap;
}

ul.multiselectoptions > li > input[type="checkbox"]+label:before {
margin-left: 7px;
}
ul.multiselectoptions > li input[type='checkbox']+label {
Expand Down Expand Up @@ -106,6 +103,7 @@ ul.multiselectoptions input.new {

ul.multiselectoptions > li.creator {
padding: 10px;
margin: 0;
font-weight: bold;
}
ul.multiselectoptions > li.creator > input {
Expand Down

0 comments on commit 4035d60

Please sign in to comment.