RTL for the security badge, add an arrow to the tooltip (#1469)
* FIx RTL on the encryption shield * Add an arrow to the tooltip
This commit is contained in:
parent
d1086f3624
commit
d7729d295a
@ -3,7 +3,7 @@
|
|||||||
.layer-ui__wrapper {
|
.layer-ui__wrapper {
|
||||||
.encrypted-icon {
|
.encrypted-icon {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 15px;
|
margin-inline-start: 15px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -18,8 +18,13 @@
|
|||||||
&.tooltip .tooltip-text {
|
&.tooltip .tooltip-text {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
width: 20rem;
|
width: 20rem;
|
||||||
bottom: calc(50% + 0.8rem);
|
bottom: calc(50% + 0.8rem + 6px);
|
||||||
left: -5px;
|
:root[dir="ltr"] & {
|
||||||
|
left: -5px;
|
||||||
|
}
|
||||||
|
:root[dir="rtl"] & {
|
||||||
|
right: -5px;
|
||||||
|
}
|
||||||
background-color: $oc-black;
|
background-color: $oc-black;
|
||||||
color: $oc-white;
|
color: $oc-white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -30,6 +35,21 @@
|
|||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
--size: 6px;
|
||||||
|
content: "";
|
||||||
|
border: var(--size) solid transparent;
|
||||||
|
border-top-color: $oc-black;
|
||||||
|
position: absolute;
|
||||||
|
bottom: calc(-2 * var(--size));
|
||||||
|
:root[dir="ltr"] & {
|
||||||
|
left: calc(5px + var(--size) / 2);
|
||||||
|
}
|
||||||
|
:root[dir="rtl"] & {
|
||||||
|
right: calc(5px + var(--size) / 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// the following 3 rules ensure that the tooltip doesn't show (nor affect
|
// the following 3 rules ensure that the tooltip doesn't show (nor affect
|
||||||
|
@ -63,7 +63,9 @@ const LayerUI = ({
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
<span className="tooltip-text">{t("encrypted.tooltip")}</span>
|
<span className="tooltip-text" dir="auto">
|
||||||
|
{t("encrypted.tooltip")}
|
||||||
|
</span>
|
||||||
{shield}
|
{shield}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user