Commit ba441cf9 authored by Regan Hsu's avatar Regan Hsu Committed by Commit Bot

[OsSettingsSearch] Update search box CSS to spec.

Specs:
https://carbon.googleplex.com/cros-ux/pages/search-bar/style?q=

Screenshots:
https://drive.google.com/corp/drive/folders/1bM5wzS4OOKVR0Agco8Dt3GXPf1ZRKpTV

Fixed: 1096875
Change-Id: I3bde5a7fa7a2d034cc18589e98121a10bb73551d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2265397Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Regan Hsu <hsuregan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782258}
parent 6212caf4
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#resultText { #resultText {
flex-grow: 1; flex-grow: 1;
margin: var(--cr-toolbar-search-field-term-margin);
} }
iron-icon { iron-icon {
......
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
<style include="settings-shared"> <style include="settings-shared">
:host { :host {
--cr-toolbar-field-width: 480px; --cr-toolbar-field-width: 480px;
--cr-toolbar-focused-min-height: 48px; --cr-toolbar-focused-min-height: 40px;
--cr-toolbar-icon-container-size: 32px; --cr-toolbar-icon-container-size: 32px;
--cr-toolbar-icon-margin: 8px; --cr-toolbar-icon-margin: 8px 16px;
--cr-toolbar-search-icon-margin-inline-start: 8px; --cr-toolbar-search-icon-margin-inline-start: 16px;
--cr-toolbar-query-exists-min-height: --cr-toolbar-query-exists-min-height:
var(--cr-toolbar-focused-min-height); var(--cr-toolbar-focused-min-height);
--separator-height: 8px; --separator-height: 8px;
...@@ -52,11 +52,12 @@ ...@@ -52,11 +52,12 @@
--cr-toolbar-search-field-prompt-margin-inline-start: 140px; --cr-toolbar-search-field-prompt-margin-inline-start: 140px;
--cr-toolbar-search-field-input-text-color: --cr-toolbar-search-field-input-text-color:
var(--cr-primary-text-color); var(--cr-primary-text-color);
font-size: 13px;
} }
:host(:focus-within) cr-toolbar-search-field { :host(:focus-within) cr-toolbar-search-field {
--cr-toolbar-search-field-background: var(--cr-card-background-color); --cr-toolbar-search-field-background: var(--cr-card-background-color);
box-shadow: var(--cr-menu-shadow); box-shadow: var(--cr-elevation-1);
min-height: var(--cr-toolbar-focused-min-height); min-height: var(--cr-toolbar-focused-min-height);
} }
...@@ -70,7 +71,8 @@ ...@@ -70,7 +71,8 @@
:host(:focus-within[should-show-dropdown_]) cr-toolbar-search-field { :host(:focus-within[should-show-dropdown_]) cr-toolbar-search-field {
--cr-toolbar-search-field-border-radius: 20px 20px 0 0; --cr-toolbar-search-field-border-radius: 20px 20px 0 0;
height: 50px; box-shadow: var(--cr-elevation-3);
height: 56px;
margin-top: var(--separator-height); margin-top: var(--separator-height);
padding-bottom: var(--separator-height); padding-bottom: var(--separator-height);
} }
...@@ -83,13 +85,13 @@ ...@@ -83,13 +85,13 @@
} }
iron-dropdown { iron-dropdown {
margin-top: 60px; margin-top: 74px;
} }
iron-dropdown [slot='dropdown-content'] { iron-dropdown [slot='dropdown-content'] {
background-color: var(--cr-menu-background-color); background-color: var(--cr-menu-background-color);
border-radius: 0 0 20px 20px; border-radius: 0 0 20px 20px;
box-shadow: var(--cr-menu-shadow); box-shadow: var(--cr-elevation-3);
display: table; display: table;
padding-bottom: 16px; padding-bottom: 16px;
} }
...@@ -108,12 +110,12 @@ ...@@ -108,12 +110,12 @@
#noSearchResultsContainer { #noSearchResultsContainer {
height: 24px; height: 24px;
margin-inline-start: 48px; margin-inline-start: 64px;
margin-top: var(--separator-height); margin-top: var(--separator-height);
} }
/* The separator covers the top box shadow of the dropdown so that /* The separator covers the top box shadow of the dropdown so that
* var(--cr-menu-shadow) can be used instead of custom values. */ * var(--cr-elevation-3) can be used instead of custom values. */
.separator { .separator {
background-color: var(--cr-menu-background-color); background-color: var(--cr-menu-background-color);
border-bottom: none; border-bottom: none;
...@@ -123,7 +125,7 @@ ...@@ -123,7 +125,7 @@
height: var(--separator-height); height: var(--separator-height);
margin-inline-end: 0; margin-inline-end: 0;
margin-inline-start: 0; margin-inline-start: 0;
margin-top: -5px; margin-top: -10px;
} }
</style> </style>
<cr-toolbar-search-field id="search" narrow="[[narrow]]" <cr-toolbar-search-field id="search" narrow="[[narrow]]"
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
color: var(--cros-default-text-color-secondary); color: var(--cros-default-text-color-secondary);
display: flex; display: flex;
height: var(--cr-toolbar-height); height: var(--cr-toolbar-height);
padding-top: 8px;
} }
:host(:not([narrow])) { :host(:not([narrow])) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment