summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2019-03-27 20:02:09 +0100
committerGitHub <noreply@github.com>2019-03-27 20:02:09 +0100
commit0d825c3f81b46d004d82ac66535ea1842b51e510 (patch)
treed73cdf0a7102e1a6db4ec68877d1cf1819889f16 /apps
parent87fbaf501ab6d54541bc8a293a737e740a431701 (diff)
parent798b2e87b9bd49843c6929da93066fab111f1498 (diff)
downloadnextcloud-server-0d825c3f81b46d004d82ac66535ea1842b51e510.tar.gz
nextcloud-server-0d825c3f81b46d004d82ac66535ea1842b51e510.zip
Merge pull request #14883 from nextcloud/bugfix/14156/checkboxes-light-theme
Fix light theme form elements
Diffstat (limited to 'apps')
-rw-r--r--apps/accessibility/css/themedark.scss12
-rw-r--r--apps/theming/css/theming.scss27
-rw-r--r--apps/theming/lib/Util.php2
-rw-r--r--apps/theming/tests/CapabilitiesTest.php2
-rw-r--r--apps/theming/tests/UtilTest.php2
5 files changed, 38 insertions, 7 deletions
diff --git a/apps/accessibility/css/themedark.scss b/apps/accessibility/css/themedark.scss
index 84f3d99c595..185b921fe67 100644
--- a/apps/accessibility/css/themedark.scss
+++ b/apps/accessibility/css/themedark.scss
@@ -74,3 +74,15 @@ $color-border-dark: lighten($color-main-background, 14%);
filter: invert(100%);
}
}
+
+input[type=checkbox] {
+ &.checkbox {
+ &:checked + label:before {
+ background-image: url('../../../core/img/actions/checkbox-mark-dark.svg');
+ }
+
+ &:indeterminate + label:before {
+ background-image: url('../../../core/img/actions/checkbox-mixed-dark.svg');
+ }
+ }
+}
diff --git a/apps/theming/css/theming.scss b/apps/theming/css/theming.scss
index 7db64924f34..928c54bc105 100644
--- a/apps/theming/css/theming.scss
+++ b/apps/theming/css/theming.scss
@@ -84,10 +84,6 @@ $invert: luma($color-primary) > 0.6;
@include icon-color('checkbox-mark', 'actions', $color-white, 1, true);
}
}
- /* Always give primary button a border for light primary colors */
- .primary {
- border-color: $color-border !important;
- }
} @else {
#appmenu:not(.inverted) svg {
filter: none;
@@ -203,6 +199,29 @@ input.primary,
}
}
+/** Handle primary buttons for bright colors */
+@if (luma($color-primary) > 0.8) {
+ select,
+ button, .button,
+ input:not([type='range']),
+ textarea,
+ div[contenteditable=true],
+ .pager li a {
+ &.primary:not(:disabled) {
+ background-color: var(--color-background-dark);
+ color: var(--color-main-text);
+ border-color: var(--color-text-lighter);
+
+ &:hover, &:focus, &:active {
+ background-color: var(--color-background-darker);
+ color: var(--color-main-text);
+ border-color: var(--color-text);
+ }
+ }
+ }
+
+}
+
@if ($color-primary == #ffffff) {
/* show grey border below header */
#body-user #header,
diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php
index 38b876f3610..75abea142c8 100644
--- a/apps/theming/lib/Util.php
+++ b/apps/theming/lib/Util.php
@@ -79,7 +79,7 @@ class Util {
public function elementColor($color) {
$l = $this->calculateLuminance($color);
if($l>0.8) {
- return '#dddddd';
+ return '#aaaaaa';
}
return $color;
}
diff --git a/apps/theming/tests/CapabilitiesTest.php b/apps/theming/tests/CapabilitiesTest.php
index 775b588c781..332d7556551 100644
--- a/apps/theming/tests/CapabilitiesTest.php
+++ b/apps/theming/tests/CapabilitiesTest.php
@@ -74,7 +74,7 @@ class CapabilitiesTest extends TestCase {
'slogan' => 'slogan',
'color' => '#FFFFFF',
'color-text' => '#000000',
- 'color-element' => '#dddddd',
+ 'color-element' => '#aaaaaa',
'logo' => 'http://absolute/logo',
'background' => 'http://absolute/background',
'background-plain' => false,
diff --git a/apps/theming/tests/UtilTest.php b/apps/theming/tests/UtilTest.php
index d0263e11224..a36c7330681 100644
--- a/apps/theming/tests/UtilTest.php
+++ b/apps/theming/tests/UtilTest.php
@@ -105,7 +105,7 @@ class UtilTest extends TestCase {
public function testElementColorOnBrightBackground() {
$elementColor = $this->util->elementColor('#ffffff');
- $this->assertEquals('#dddddd', $elementColor);
+ $this->assertEquals('#aaaaaa', $elementColor);
}
public function testGenerateRadioButtonWhite() {