Skip to content

Commit dd1a5b9

Browse files
jancborchardtMariusBluem
authored andcommitted
Fix search box overlapping on mobile (#450)
* fix searchbox overlapping on mobile * also adjust log in background color in theme * Fix unit tests
1 parent 9dafc51 commit dd1a5b9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

apps/theming/lib/controller/themingcontroller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function __construct(
7373
IRootFolder $rootFolder
7474
) {
7575
parent::__construct($appName, $request);
76-
76+
7777
$this->template = $template;
7878
$this->l = $l;
7979
$this->config = $config;
@@ -216,7 +216,7 @@ public function getStylesheet() {
216216
$color = $this->config->getAppValue($this->appName, 'color');
217217
if($color !== '') {
218218
$responseCss .= sprintf(
219-
'#body-user #header,#body-settings #header,#body-public #header {background-color: %s}',
219+
'#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: %s}',
220220
$color
221221
);
222222
}

apps/theming/tests/lib/controller/ThemingControllerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ public function testGetStylesheetWithOnlyColor() {
327327
->with('theming', 'backgroundMime', '')
328328
->willReturn('');
329329

330-
$expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header {background-color: #000}', 'style', 'text/css');
330+
$expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #000}', 'style', 'text/css');
331331
$expected->cacheFor(3600);
332332
@$this->assertEquals($expected, $this->themingController->getStylesheet());
333333
}
@@ -354,7 +354,7 @@ public function testGetStylesheetWithOnlyColorInvert() {
354354
->with('theming', 'backgroundMime', '')
355355
->willReturn('');
356356

357-
$expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header {background-color: #fff}#header .header-appname, #expandDisplayName { color: #000000; } #header .icon-caret { background-image: url(\'' . \OC::$WEBROOT . '/core/img/actions/caret-dark.svg\'); } .searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid { color: #000; border: 1px solid rgba(0, 0, 0, .5); }', 'style', 'text/css');
357+
$expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #fff}#header .header-appname, #expandDisplayName { color: #000000; } #header .icon-caret { background-image: url(\'' . \OC::$WEBROOT . '/core/img/actions/caret-dark.svg\'); } .searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid { color: #000; border: 1px solid rgba(0, 0, 0, .5); }', 'style', 'text/css');
358358
$expected->cacheFor(3600);
359359
@$this->assertEquals($expected, $this->themingController->getStylesheet());
360360
}
@@ -443,7 +443,7 @@ public function testGetStylesheetWithAllCombined() {
443443
->with('theming', 'backgroundMime', '')
444444
->willReturn('image/png');
445445

446-
$expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header {background-color: #000}#header .logo {
446+
$expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #000}#header .logo {
447447
background-image: url(\'./logo?v=0\');
448448
}
449449
#header .logo-icon {
@@ -477,7 +477,7 @@ public function testGetStylesheetWithAllCombinedInverted() {
477477
->with('theming', 'backgroundMime', '')
478478
->willReturn('image/png');
479479

480-
$expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header {background-color: #fff}#header .logo {
480+
$expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #fff}#header .logo {
481481
background-image: url(\'./logo?v=0\');
482482
}
483483
#header .logo-icon {

core/css/styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ a.two-factor-cancel {
118118
width: 155px;
119119
max-width: 50%;
120120
cursor: text;
121-
background-color: transparent;
121+
background-color: #0082c9;
122122
border: 1px solid rgba(255, 255, 255, .5);
123123
}
124124

0 commit comments

Comments
 (0)