Commit a76b5ec5 authored by Esmael El-Moslimany's avatar Esmael El-Moslimany Committed by Commit Bot

Downloads WebUI: allow toolbar to resize along with decreased window widths

Bug: 841708
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: Iae485cc912bed7bcbb3ebd6e435c5f3d0208a550
Reviewed-on: https://chromium-review.googlesource.com/1124982Reviewed-by: default avatarScott Chen <scottchen@chromium.org>
Commit-Queue: Esmael El-Moslimany <aee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574319}
parent eda64b39
...@@ -27,15 +27,7 @@ ...@@ -27,15 +27,7 @@
z-index: 0; z-index: 0;
} }
@media screen and (max-width: 1024px) {
:host {
flex-basis: calc(
var(--downloads-card-width) + 2 * var(--downloads-card-margin));
}
}
#toolbar { #toolbar {
position: relative;
z-index: 1; z-index: 1;
} }
...@@ -48,6 +40,8 @@ ...@@ -48,6 +40,8 @@
} }
#downloads-list { #downloads-list {
min-width: calc(
var(--downloads-card-width) + 2 * var(--downloads-card-margin));
/* TODO(dbeam): we're not setting scrollTarget explicitly, yet /* TODO(dbeam): we're not setting scrollTarget explicitly, yet
* style="overflow: auto" is still being set by <iron-list>'s JS. Weird. * style="overflow: auto" is still being set by <iron-list>'s JS. Weird.
*/ */
...@@ -84,22 +78,30 @@ ...@@ -84,22 +78,30 @@
height: 144px; /* Matches natural image height. */ height: 144px; /* Matches natural image height. */
margin-bottom: 32px; margin-bottom: 32px;
} }
#mainContainer {
display: flex;
flex: 1;
overflow: auto;
}
</style> </style>
<downloads-toolbar id="toolbar" spinner-active="{{spinnerActive_}}" <downloads-toolbar id="toolbar" spinner-active="{{spinnerActive_}}"
role="none"> role="none">
</downloads-toolbar> </downloads-toolbar>
<div id="drop-shadow"></div> <div id="drop-shadow"></div>
<iron-list id="downloads-list" items="[[items_]]" <div id="mainContainer">
hidden="[[!hasDownloads_]]"> <iron-list id="downloads-list" items="[[items_]]"
<template> hidden="[[!hasDownloads_]]">
<downloads-item data="[[item]]"></downloads-item> <template>
</template> <downloads-item data="[[item]]"></downloads-item>
</iron-list> </template>
<div id="no-downloads" hidden="[[hasDownloads_]]"> </iron-list>
<div> <div id="no-downloads" hidden="[[hasDownloads_]]">
<div class="illustration"></div> <div>
<span>[[noDownloadsText_(inSearchMode_)]]</span> <div class="illustration"></div>
<span>[[noDownloadsText_(inSearchMode_)]]</span>
</div>
</div> </div>
</div> </div>
</template> </template>
......
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