| Index: chrome/browser/resources/md_bookmarks/dnd_chip.html
|
| diff --git a/chrome/browser/resources/md_bookmarks/dnd_chip.html b/chrome/browser/resources/md_bookmarks/dnd_chip.html
|
| index 9703e169ec632a7ddbb3fdbb21364b091116eadb..cac03f1a86172a81b06edfab195faceea714a430 100644
|
| --- a/chrome/browser/resources/md_bookmarks/dnd_chip.html
|
| +++ b/chrome/browser/resources/md_bookmarks/dnd_chip.html
|
| @@ -9,24 +9,39 @@
|
| <template>
|
| <style include="shared-style">
|
| :host {
|
| - align-items: center;
|
| - background-color: var(--interactive-color);
|
| - border-radius: 20px;
|
| - box-shadow: 0 0 8px 0 rgba(0,0,0,0.12), 0 8px 8px 0 rgba(0,0,0,0.24);
|
| - display: none;
|
| - height: 40px;
|
| + --chip-height: 40px;
|
| + --chip-padding-x: 20px;
|
| + --chip-width: 172px;
|
| +
|
| left: 0;
|
| - padding: 0 20px;
|
| pointer-events: none;
|
| position: absolute;
|
| top: 0;
|
| - transform: translate(
|
| - calc(var(--mouse-x) - 50%), calc(var(--mouse-y) - 80%));
|
| - width: 132px;
|
| + transform: translate(calc(var(--mouse-x) - var(--chip-width) * 0.5),
|
| + calc(var(--mouse-y) - var(--chip-height) * 0.8));
|
| + z-index: 2;
|
| }
|
|
|
| - :host([showing_]) {
|
| - display: flex;
|
| + :host(:not([showing_])) {
|
| + display: none;
|
| + }
|
| +
|
| + .chip-container {
|
| + background-color: var(--interactive-color);
|
| + border-radius: calc(var(--chip-height) / 2);
|
| + box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.12),
|
| + 0 8px 8px 0 rgba(0, 0, 0, 0.24);
|
| + height: var(--chip-height);
|
| + left: 0;
|
| + padding: 0 var(--chip-padding-x);
|
| + position: absolute;
|
| + top: 0;
|
| + width: calc(var(--chip-width) - var(--chip-padding-x) * 2);
|
| + }
|
| +
|
| + #secondary {
|
| + left: 5px;
|
| + top: 5px;
|
| }
|
|
|
| #title {
|
| @@ -41,13 +56,10 @@
|
| }
|
|
|
| #icon-wrapper {
|
| - align-items: center;
|
| background: white;
|
| border-radius: 12px;
|
| color: var(--secondary-text-color);
|
| - display: flex;
|
| height: 24px;
|
| - justify-content: center;
|
| position: relative;
|
| width: 24px;
|
| }
|
| @@ -58,13 +70,42 @@
|
| margin: 2px;
|
| width: 16px;
|
| }
|
| +
|
| + .centered {
|
| + align-items: center;
|
| + display: flex;
|
| + justify-content: center;
|
| + }
|
| +
|
| + #count {
|
| + background: var(--google-red-500);
|
| + border-radius: 12px;
|
| + color: white;
|
| + font-weight: 500;
|
| + height: 24px;
|
| + min-width: 14px;
|
| + padding: 0 5px;
|
| + position: absolute;
|
| + right: -170px;
|
| + top: -10px;
|
| + }
|
| +
|
| + :host-context([dir='rtl']) #count {
|
| + left: 2px;
|
| + right: auto;
|
| + }
|
| </style>
|
| - <div id="icon-wrapper">
|
| - <iron-icon id="folder-icon" icon="cr:folder" hidden$="[[!isFolder_]]">
|
| - </iron-icon>
|
| - <div id="icon" hidden$="[[isFolder_]]"></div>
|
| + <div id="secondary" class="chip-container" hidden$="[[!isMultiItem_]]">
|
| + </div>
|
| + <div id="primary" class="chip-container centered">
|
| + <div id="icon-wrapper" class="centered">
|
| + <iron-icon id="folder-icon" icon="cr:folder" hidden$="[[!isFolder_]]">
|
| + </iron-icon>
|
| + <div id="icon" hidden$="[[isFolder_]]"></div>
|
| + </div>
|
| + <div id="title"></div>
|
| </div>
|
| - <div id="title"></div>
|
| + <div id="count" class="centered" hidden$="[[!isMultiItem_]]"></div>
|
| </template>
|
| <script src="chrome://bookmarks/dnd_chip.js"></script>
|
| <dom-module>
|
|
|