From c4fb4b00ae77e8ce82d84fe906d51f5adb17846c Mon Sep 17 00:00:00 2001 From: zombieFox Date: Wed, 24 Jun 2020 23:32:00 +0100 Subject: [PATCH] [bug] fix link url and control position when orientation is set to top --- package-lock.json | 2 +- package.json | 2 +- src/css/link.css | 41 +++++++++++++++++++++++++++++++++-------- src/js/version.js | 2 +- src/manifest.json | 2 +- 5 files changed, 37 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index c053da70..9183e464 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nightTab", - "version": "5.48.0", + "version": "5.48.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c60f4389..14ba2dc6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nightTab", - "version": "5.48.0", + "version": "5.48.1", "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 7ad01d70..e0ca6067 100755 --- a/src/css/link.css +++ b/src/css/link.css @@ -884,16 +884,28 @@ height: var(--link-item-edit-height); width: 100%; position: absolute; - bottom: calc(-1 * var(--link-item-edit-height)); display: flex; overflow: hidden; flex-direction: row; align-items: stretch; justify-content: center; - transition: bottom var(--layout-transition-extra-fast); + transition: top var(--layout-transition-extra-fast), bottom var(--layout-transition-extra-fast); } -.is-edit .link-control { +.is-link-orientation-top .link-control { + top: calc(-1 * var(--link-item-edit-height)); +} + +.is-link-orientation-bottom .link-control { + bottom: calc(-1 * var(--link-item-edit-height)); +} + +.is-edit.is-link-orientation-top .link-control { + top: 0; + transition: top var(--layout-duration-05) var(--layout-timing-bounce); +} + +.is-edit.is-link-orientation-bottom .link-control { bottom: 0; transition: bottom var(--layout-duration-05) var(--layout-timing-bounce); } @@ -1027,11 +1039,18 @@ height: var(--link-item-url-height); width: 100%; position: absolute; - bottom: calc(-1 * var(--link-item-url-height)); overflow: hidden; display: none; align-items: center; - transition: bottom var(--layout-transition-extra-fast); + transition: top var(--layout-transition-extra-fast), bottom var(--layout-transition-extra-fast); +} + +.is-link-orientation-top .link-url { + top: calc(-1 * var(--link-item-url-height)); +} + +.is-link-orientation-bottom .link-url { + bottom: calc(-1 * var(--link-item-url-height)); } .is-link-item-url-show .link-url { @@ -1056,9 +1075,15 @@ justify-content: flex-end; } -.is-link-item-url-show:not(.is-edit) .link-item:focus-within .link-url, -.is-link-item-url-show:not(.is-edit) .link-item:focus .link-url, -.is-link-item-url-show:not(.is-edit) .link-item:hover .link-url { +.is-link-orientation-top.is-link-item-url-show:not(.is-edit) .link-item:focus-within .link-url, +.is-link-orientation-top.is-link-item-url-show:not(.is-edit) .link-item:focus .link-url, +.is-link-orientation-top.is-link-item-url-show:not(.is-edit) .link-item:hover .link-url { + top: 0; +} + +.is-link-orientation-bottom.is-link-item-url-show:not(.is-edit) .link-item:focus-within .link-url, +.is-link-orientation-bottom.is-link-item-url-show:not(.is-edit) .link-item:focus .link-url, +.is-link-orientation-bottom.is-link-item-url-show:not(.is-edit) .link-item:hover .link-url { bottom: 0; } diff --git a/src/js/version.js b/src/js/version.js index 4e764497..8941cbe4 100644 --- a/src/js/version.js +++ b/src/js/version.js @@ -1,6 +1,6 @@ var version = (function() { - var current = "5.48.0"; + var current = "5.48.1"; var name = "Macabre Caterpillar"; diff --git a/src/manifest.json b/src/manifest.json index bc29e13c..6b6361da 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "name": "nightTab", "short_name": "nightTab", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", - "version": "5.48.0", + "version": "5.48.1", "manifest_version": 2, "chrome_url_overrides": { "newtab": "index.html"