From 33ec73095e3a35b3399f9414753faee8d97f10ea Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 29 Jan 2020 22:44:49 +0000 Subject: [PATCH] Apply the Olympic effect to SAS Emoji Verification Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../verification/_VerificationShowSas.scss | 27 ++++++++++++++++--- .../views/verification/VerificationShowSas.js | 6 +++-- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/res/css/views/verification/_VerificationShowSas.scss b/res/css/views/verification/_VerificationShowSas.scss index a0da7e2539..72213072f9 100644 --- a/res/css/views/verification/_VerificationShowSas.scss +++ b/res/css/views/verification/_VerificationShowSas.scss @@ -28,21 +28,42 @@ limitations under the License. .mx_VerificationShowSas_emojiSas { text-align: center; + display: flex; + flex-wrap: wrap; + justify-content: center; + margin: 25px 0; } .mx_VerificationShowSas_emojiSas_block { display: inline-block; - margin-left: 15px; - margin-right: 15px; text-align: center; - margin-bottom: 20px; + margin-bottom: 30px; + position: relative; + // allow the blocks to grow to space themselves evenly up to a limit of 100px + flex-grow: 1; + max-width: 100px; } .mx_VerificationShowSas_emojiSas_emoji { font-size: 48px; } +.mx_UserInfo .mx_VerificationShowSas_emojiSas_emoji { + font-size: 32px; // in UserInfo use a smaller font-size to fit in a smaller space + width: 43px; + margin: 0 auto; +} + .mx_VerificationShowSas_emojiSas_label { text-align: center; font-weight: bold; + // allow the text to overflow the parent by 15px on each side + // this is to keep the width of the parent consistent for spacing centrally via flexbox + position: absolute; + left: -15px; + right: -15px; +} + +.mx_VerificationShowSas_emojiSas_break { + flex-basis: 100%; } diff --git a/src/components/views/verification/VerificationShowSas.js b/src/components/views/verification/VerificationShowSas.js index 40d3b96beb..38bc1bb40a 100644 --- a/src/components/views/verification/VerificationShowSas.js +++ b/src/components/views/verification/VerificationShowSas.js @@ -62,7 +62,9 @@ export default class VerificationShowSas extends React.Component { , ); sasDisplay =
{sasCaption}
-{_t("To be secure, do this in person or use a trusted way to communicate.")}
{sasDisplay} +{_t("To be secure, do this in person or use a trusted way to communicate.")}
{confirm}