From a80935e181da404e64643d4619d150872da3db75 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 16 Nov 2017 11:45:40 +0000 Subject: [PATCH] JSX does not do comments in a way one might expect --- src/components/views/messages/SenderProfile.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/views/messages/SenderProfile.js b/src/components/views/messages/SenderProfile.js index 04e7832493..a8116b1e8a 100644 --- a/src/components/views/messages/SenderProfile.js +++ b/src/components/views/messages/SenderProfile.js @@ -50,13 +50,13 @@ export default function SenderProfile(props) { content = substitute('%(senderName)s', { senderName: () => nameElem }); } + // The text surrounding the user name must be wrapped in order for it to have the correct opacity. + // It is not possible to wrap the whole thing, because the user name might contain flair which should + // be shown at full opacity. Sadly CSS does not make it possible to "reset" opacity so we have to do it + // in parts like this. Sometimes CSS makes me a sad panda :-( + // XXX: This could be avoided if the actual colour is set, rather than faking it with opacity return (
- // The text surrounding the user name must be wrapped in order for it to have the correct opacity. - // It is not possible to wrap the whole thing, because the user name might contain flair which should - // be shown at full opacity. Sadly CSS does not make it possible to "reset" opacity so we have to do it - // in parts like this. Sometimes CSS makes me a sad panda :-( - // XXX: This could be avoided if the actual colour is set, rather than faking it with opacity { content.props.children[0] ? { content.props.children[0] } : '' }