diff --git a/package.json b/package.json index d0d47f17..b9af4df2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nighttab", - "version": "3.80.0", + "version": "3.81.0", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", "main": "index.js", "scripts": { diff --git a/src/css/link.css b/src/css/link.css index 78377dce..82572a4c 100755 --- a/src/css/link.css +++ b/src/css/link.css @@ -95,16 +95,27 @@ .link-panel-front { background-color: rgb(var(--theme-gray-02)); border-radius: var(--theme-radius); + position: absolute; + left: 0; width: 100%; height: 100%; display: flex; z-index: 3; overflow: hidden; - position: relative; user-select: none; transition: background-color var(--layout-timing-extra-fast), height var(--layout-timing-extra-fast), box-shadow var(--layout-timing-extra-fast); } +.is-link-orientation-top .link-panel-front { + top: inherit; + bottom: 0; +} + +.is-link-orientation-bottom .link-panel-front { + top: 0; + bottom: inherit; +} + .is-link-item-border .link-panel-front { border: calc(calc(var(--layout-line-width) / 2) * var(--link-item-border)) solid rgb(var(--theme-accent)); } @@ -244,23 +255,57 @@ top: var(--layout-line-width); left: var(--layout-line-width); display: flex; - flex-direction: column; - justify-content: flex-end; align-items: stretch; + justify-content: flex-end; z-index: 2; - transition: height var(--layout-timing-extra-fast), top var(--layout-timing-extra-fast); + transition: height var(--layout-timing-extra-fast), top var(--layout-timing-extra-fast), clip-path var(--layout-timing-extra-fast); + clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); +} + +.is-link-orientation-top .link-panel-back { + flex-direction: column-reverse; +} + +.is-link-orientation-bottom .link-panel-back { + flex-direction: column; } .is-link-item-line-show .link-panel-back { height: calc(100% - var(--layout-line-width)); } -.is-link-edit .link-panel-back, -.is-link-item-url-show:not(.is-link-item-line-show) .link-item:focus .link-panel-back, -.is-link-item-url-show:not(.is-link-item-line-show) .link-item:focus-within .link-panel-back, -.is-link-item-url-show:not(.is-link-item-line-show) .link-item:hover .link-panel-back { +.is-link-item-line-show.is-link-orientation-top .link-panel-back { + top: 0; +} + +.is-link-item-line-show.is-link-orientation-bottom .link-panel-back { + top: var(--layout-line-width); +} + +.is-link-orientation-top.is-link-edit .link-panel-back, +.is-link-orientation-bottom.is-link-edit .link-panel-back { height: 100%; top: 0; +} + +.link-item:focus .link-panel-back, +.link-item:focus-within .link-panel-back, +.link-item:hover .link-panel-back { + height: 100%; + top: 0; +} + +.is-link-orientation-top.is-link-edit .link-panel-back, +.is-link-orientation-top .link-item:focus .link-panel-back, +.is-link-orientation-top .link-item:focus-within .link-panel-back, +.is-link-orientation-top .link-item:hover .link-panel-back { + clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--layout-line-width)), 0 calc(100% - var(--layout-line-width))); +} + +.is-link-orientation-bottom.is-link-edit .link-panel-back, +.is-link-orientation-bottom .link-item:focus .link-panel-back, +.is-link-orientation-bottom .link-item:focus-within .link-panel-back, +.is-link-orientation-bottom .link-item:hover .link-panel-back { clip-path: polygon(0 var(--layout-line-width), 100% var(--layout-line-width), 100% 100%, 0 100%); } @@ -357,9 +402,9 @@ justify-content: flex-end; } -.is-link-item-url-show .link-item:focus-within .link-url, -.is-link-item-url-show .link-item:focus .link-url, -.is-link-item-url-show .link-item:hover .link-url { +.is-link-item-url-show:not(.is-link-edit) .link-item:focus-within .link-url, +.is-link-item-url-show:not(.is-link-edit) .link-item:focus .link-url, +.is-link-item-url-show:not(.is-link-edit) .link-item:hover .link-url { height: var(--link-item-url-height); } @@ -502,7 +547,7 @@ .is-link-edit .link-item:hover .link-panel-front, .is-link-edit .link-item:focus .link-panel-front { height: calc(100% - var(--link-item-edit-height)); - box-shadow: var(--layout-shadow-medium); + box-shadow: var(--layout-shadow-small); } .is-link-edit.is-link-item-url-show .link-item:focus .link-panel-front, diff --git a/src/css/variables.css b/src/css/variables.css index 0be4275a..3f250392 100644 --- a/src/css/variables.css +++ b/src/css/variables.css @@ -56,9 +56,9 @@ --layout-timing-medium: 0.6s ease-in-out; --layout-timing-slow: 0.8s ease-in-out; --layout-timing-extra-slow: 1s ease-in-out; - --layout-shadow-small: 0 1px 2px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.2); - --layout-shadow-medium: 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.2); - --layout-shadow-large: 0 3px 6px rgba(0, 0, 0, 0.1), 0 6px 12px rgba(0, 0, 0, 0.2); + --layout-shadow-small: 0 0 2px rgba(0, 0, 0, 0.2), 0 0 4px rgba(0, 0, 0, 0.1); + --layout-shadow-medium: 0 0 4px rgba(0, 0, 0, 0.2), 0 0 8px rgba(0, 0, 0, 0.1); + --layout-shadow-large: 0 0 8px rgba(0, 0, 0, 0.2), 0 0 12px rgba(0, 0, 0, 0.1); /* background */ --background-color-theme: var(--theme-gray-01); --background-color-custom: rgb(0, 0, 0); diff --git a/src/index.html b/src/index.html index ae025645..e14aa1fb 100644 --- a/src/index.html +++ b/src/index.html @@ -943,6 +943,22 @@
Bookmark tiles more short and wide with content stacked horizontally.
+