Fix e2e icon rendering (#31454)
* Fix e2e icon rendering Regressed by change to compound icons, due to it relying on a hack of rendering icons atop each other to draw a background. Also fixes a nested tooltip which became annoying during testing Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -9,54 +9,25 @@ Please see LICENSE files in the repository root for full details.
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: 0 9px;
|
||||
position: relative;
|
||||
display: block;
|
||||
|
||||
svg {
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_E2EIcon.mx_E2EIcon_inline {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.mx_E2EIcon_warning,
|
||||
.mx_E2EIcon_normal,
|
||||
.mx_E2EIcon_verified {
|
||||
&::before,
|
||||
&::after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
mask-size: contain;
|
||||
}
|
||||
.mx_E2EIcon_warning {
|
||||
color: $e2e-warning-color;
|
||||
}
|
||||
|
||||
/* transparent-looking border surrounding the shield for when overlain over avatars */
|
||||
.mx_E2EIcon_bordered {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/lock-solid.svg");
|
||||
background-color: $header-panel-bg-color;
|
||||
mask-size: 100%;
|
||||
|
||||
/* shrink the actual badge */
|
||||
&::after {
|
||||
mask-size: 75%;
|
||||
}
|
||||
/* shrink the infill of the badge */
|
||||
&::before {
|
||||
mask-size: 60%;
|
||||
background: var(--cpd-color-bg-canvas-default);
|
||||
}
|
||||
}
|
||||
|
||||
.mx_E2EIcon_warning::after {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/error-solid.svg");
|
||||
background-color: $e2e-warning-color;
|
||||
}
|
||||
|
||||
.mx_E2EIcon_normal::after {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/lock-solid.svg");
|
||||
background-color: var(--cpd-color-icon-tertiary);
|
||||
.mx_E2EIcon_normal {
|
||||
color: var(--cpd-color-icon-tertiary);
|
||||
}
|
||||
|
||||
.mx_E2EIcon_verified,
|
||||
@@ -66,7 +37,6 @@ Please see LICENSE files in the repository root for full details.
|
||||
}
|
||||
}
|
||||
|
||||
.mx_E2EIcon_verified::after {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/shield.svg");
|
||||
background-color: $e2e-verified-color;
|
||||
.mx_E2EIcon_verified {
|
||||
color: $e2e-verified-color;
|
||||
}
|
||||
|
||||
@@ -38,11 +38,6 @@ Please see LICENSE files in the repository root for full details.
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.mx_MessageComposer_autocomplete_wrapper {
|
||||
position: relative;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.mx_MessageComposer_row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -67,19 +62,20 @@ Please see LICENSE files in the repository root for full details.
|
||||
}
|
||||
}
|
||||
|
||||
.mx_MessageComposer_composecontrols {
|
||||
width: 100%;
|
||||
}
|
||||
.mx_MessageComposer_e2eIconWrapper {
|
||||
height: 12px; /* Match the height of the E2E icon for alignment */
|
||||
}
|
||||
.mx_MessageComposer_e2eIcon.mx_E2EIcon {
|
||||
width: 12px;
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 22px;
|
||||
margin-right: 0; /* Counteract the E2EIcon class */
|
||||
margin-left: 3px; /* Counteract the E2EIcon class */
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
|
||||
.mx_MessageComposer_e2eIcon {
|
||||
margin: 0;
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_MessageComposer_noperm_error {
|
||||
@@ -92,13 +88,6 @@ Please see LICENSE files in the repository root for full details.
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mx_MessageComposer_input_wrapper {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.mx_MessageComposer_input {
|
||||
flex: 1;
|
||||
vertical-align: middle;
|
||||
@@ -145,38 +134,6 @@ Please see LICENSE files in the repository root for full details.
|
||||
}
|
||||
}
|
||||
|
||||
.mx_MessageComposer_editor {
|
||||
width: 100%;
|
||||
max-height: 120px;
|
||||
min-height: 19px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
word-break: break-word;
|
||||
|
||||
/* FIXME: rather unpleasant hack to get rid of <p/> margins. */
|
||||
/* really we should be mixing in markdown-body from github-markdown-css instead */
|
||||
> :first-child {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
> :last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes visualbell {
|
||||
from {
|
||||
background-color: $visual-bell-bg-color;
|
||||
}
|
||||
to {
|
||||
background-color: $background;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_MessageComposer_input_error {
|
||||
animation: 0.2s visualbell;
|
||||
}
|
||||
|
||||
.mx_MessageComposer_button_highlight {
|
||||
@mixin composerButtonHighLight;
|
||||
}
|
||||
@@ -198,10 +155,6 @@ Please see LICENSE files in the repository root for full details.
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
&.mx_MessageComposer_hangup:not(.mx_AccessibleButton_disabled)::before {
|
||||
background-color: $alert;
|
||||
}
|
||||
}
|
||||
.mx_MessageComposer_wysiwyg {
|
||||
.mx_MessageComposer_wrapper {
|
||||
@@ -237,10 +190,6 @@ Please see LICENSE files in the repository root for full details.
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
&.mx_MessageComposer_hangup:not(.mx_AccessibleButton_disabled)::before {
|
||||
background-color: $alert;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,6 +271,10 @@ Please see LICENSE files in the repository root for full details.
|
||||
padding: 0 0 0 25px;
|
||||
}
|
||||
|
||||
.mx_MessageComposer_e2eIconWrapper {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
&:not(.mx_MessageComposer_e2eStatus) {
|
||||
.mx_MessageComposer_wrapper {
|
||||
padding: 0;
|
||||
|
||||
Reference in New Issue
Block a user