diff --git a/elements/nuxeo-data-grid/nuxeo-document-grid-thumbnail.js b/elements/nuxeo-data-grid/nuxeo-document-grid-thumbnail.js index 966ae39f37..ad67e63456 100644 --- a/elements/nuxeo-data-grid/nuxeo-document-grid-thumbnail.js +++ b/elements/nuxeo-data-grid/nuxeo-document-grid-thumbnail.js @@ -63,8 +63,7 @@ Polymer({ border: 2px solid transparent; } - .bubbleBox:hover, - .bubbleBox:focus { + .bubbleBox:hover { z-index: 500; border: 2px solid var(--nuxeo-link-hover-color); box-shadow: 0 3px 5px rgba(0, 0, 0, 0.04); @@ -108,7 +107,7 @@ Polymer({ } .bubbleBox .select { - display: none; + // display: none; position: absolute; top: 1rem; left: 1rem; @@ -142,7 +141,7 @@ Polymer({ } .bubbleBox .actions { - display: none; + // display: none; background-color: var(--nuxeo-box); position: absolute; bottom: 0; @@ -159,11 +158,11 @@ Polymer({ @apply --nuxeo-action-hover; } - .bubbleBox:hover .actions, + /* .bubbleBox:hover .actions, .bubbleBox:hover .select, .bubbleBox[selection-mode] .select { display: block; - } + } */ .bubbleBox:hover .select:hover { border: 2px solid var(--nuxeo-button-primary); @@ -189,35 +188,67 @@ Polymer({ :host(.droptarget-hover) .bubbleBox { border: 2px dashed var(--nuxeo-grid-selected); } + + :host(:focus) .bubbleBox { + z-index: 500; + border: 2px solid var(--nuxeo-link-hover-color); + box-shadow: 0 3px 5px rgba(0, 0, 0, 0.04); + } + + :host(:focus) .bubbleBox .actions, + :host(:focus) .bubbleBox .select, + .bubbleBox:hover .actions, + .bubbleBox:hover .select, + .bubbleBox[selection-mode] .select { + opacity: 1; + height: auto; + overflow: visible; + transition: opacity 0.2s ease, height 0.2s ease; + } + + .bubbleBox .actions, + .bubbleBox .select { + opacity: 0; + height: 0; + overflow: hidden; + transition: opacity 0.2s ease, height 0.2s ease; + } + + /* div.actions *:focus-visible { + outline: none; + } */ + + /* :host *:focus-visible { + outline: none; + } */