From e02b09f405c81fd3eb612b0bb1f78f5860b0a5e8 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 8 May 2020 19:10:52 +0200 Subject: viewer/style/global: factorise flex centering container --- viewer/src/assets/scss/global.scss | 11 +++++++++++ viewer/src/components/LdDownload.vue | 9 +-------- viewer/src/components/LdError.vue | 9 +-------- 3 files changed, 13 insertions(+), 16 deletions(-) (limited to 'viewer/src') diff --git a/viewer/src/assets/scss/global.scss b/viewer/src/assets/scss/global.scss index 9444548..5d2e6dc 100644 --- a/viewer/src/assets/scss/global.scss +++ b/viewer/src/assets/scss/global.scss @@ -51,6 +51,17 @@ button svg + span { align-items: center; } +/** + * Class for containers that centers its content vertically and horizontally, + * preferably sticking to the container start if the container is smaller than the content. + */ +.container-vh-centering { + min-height: 100%; + display: flex; + align-items: center; + justify-content: center; +} + // === Links .link { diff --git a/viewer/src/components/LdDownload.vue b/viewer/src/components/LdDownload.vue index f86d455..aea4123 100644 --- a/viewer/src/components/LdDownload.vue +++ b/viewer/src/components/LdDownload.vue @@ -19,7 +19,7 @@ -->