Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(809)

Unified Diff: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html

Issue 2140943002: MD WebUI: Center search field correctly inside cr-toolbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove extra overflow Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html
diff --git a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html
index a50b7853ada9a5c9a7a805dcc76654b82bf82f16..50c4c8f37997b1e844bd2e9b477d96a8ae564f4d 100644
--- a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html
+++ b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html
@@ -7,6 +7,7 @@
<template>
<style>
:host {
+ --cr-toolbar-field-width: 580px;
color: #fff;
display: flex;
height: 56px;
@@ -16,11 +17,16 @@
@apply(--layout-flex);
font-size: 123%;
font-weight: 400;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
}
#leftContent {
align-items: center;
display: flex;
+ position: absolute;
+ transition: opacity 100ms;
}
#leftContent paper-icon-button {
@@ -41,12 +47,16 @@
justify-content: center;
}
+ :host(:not([narrow_])) #leftContent {
+ max-width: calc((100% - var(--cr-toolbar-field-width) - 18px) / 2);
+ }
+
:host([narrow_]) #centeredContent {
justify-content: flex-end;
}
:host([narrow_][showing-search_]) #leftContent {
- display: none;
+ opacity: 0;
}
</style>
<div id="leftContent">
« no previous file with comments | « no previous file | ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698