riot-web/res/css/views/rooms/_E2EIcon.scss

73 lines
1.9 KiB
SCSS
Raw Normal View History

/*
Copyright 2019 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
.mx_E2EIcon {
width: 25px;
height: 25px;
margin: 0 9px;
2019-11-12 16:25:38 +01:00
position: relative;
display: block;
}
.mx_E2EIcon_verified::before, .mx_E2EIcon_warning::before {
content: "";
display: block;
2019-11-15 17:29:38 +01:00
/* the symbols in the shield icons are cut out to make it themeable with css masking.
2019-11-12 16:25:38 +01:00
if they appear on a different background than white, the symbol wouldn't be white though, so we
2019-11-15 17:29:38 +01:00
add a rectangle here below the masked element to shine through the symbol cut-out.
2019-11-12 16:25:38 +01:00
hardcoding white and not using a theme variable as this would probably be white for any theme. */
background-color: white;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
2019-11-12 16:25:38 +01:00
.mx_E2EIcon_verified::after, .mx_E2EIcon_warning::after {
content: "";
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
mask-repeat: no-repeat;
mask-size: contain;
}
.mx_E2EIcon_verified::before {
/* white rectangle below checkmark of shield */
margin: 25% 28% 38% 25%;
}
.mx_E2EIcon_verified::after {
mask-image: url('$(res)/img/e2e/verified.svg');
2019-11-13 17:56:04 +01:00
background-color: $accent-color;
2019-11-12 16:25:38 +01:00
}
.mx_E2EIcon_warning::before {
/* white rectangle below "!" of shield */
margin: 18% 40% 25% 40%;
}
2019-11-12 16:25:38 +01:00
.mx_E2EIcon_warning::after {
mask-image: url('$(res)/img/e2e/warning.svg');
background-color: $warning-color;
}