File size: 3,242 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
.community-translator {
position: fixed;
bottom: 66px;
right: 24px;
border-radius: 27px; /* stylelint-disable-line scales/radii */
background: var(--color-primary);
cursor: pointer;
padding: 4px;
font-size: $font-body-small;
z-index: z-index("root", ".community-translator");
&.is-active {
background: var(--color-accent);
}
&.is-incompatible {
background: var(--color-neutral-5);
border: 1px solid var(--color-neutral-10);
}
}
.community-translator__button {
align-items: center;
color: var(--color-text-inverted);
text-decoration: none;
outline: 0;
display: flex;
cursor: pointer;
&:hover {
color: var(--color-text-inverted);
.community-translator__text {
transition: all 0.15s ease-in-out;
width: auto;
margin-right: 6px;
padding: 0 2px;
}
}
.is-incompatible & {
color: var(--color-neutral-20);
}
}
.community-translator__badge {
position: absolute;
left: 50%;
top: -8px;
padding: 1px 3px;
border: 1px solid var(--color-neutral-10);
border-radius: 2px;
background: var(--color-neutral-5);
color: var(--color-neutral-20);
font-size: 0.6em;
text-transform: uppercase;
white-space: nowrap;
transform: translateX(-50%);
}
.community-translator__text {
width: 0;
overflow: hidden;
white-space: nowrap;
}
// Overwriting the popup defaults
body {
.webui-popover {
border-radius: 2px;
padding: 0;
text-align: inherit;
border-color: var(--color-neutral-10);
z-index: z-index("root", "body .webui-popover"); // Appear above dialog
.webui-popover-title {
background-color: var(--color-neutral-10);
border-color: var(--color-neutral-0);
/* stylelint-disable-next-line scales/radii */
border-radius: 1px 1px 0 0;
}
&.top,
&.top-right,
&.top-left {
.arrow {
border-top-color: var(--color-neutral-10);
}
}
&.right,
&.right-top,
&.right-bottom {
.arrow {
border-right-color: var(--color-neutral-10);
}
}
&.left,
&.left-top,
&.left-bottom {
.arrow {
border-left-color: var(--color-neutral-10);
}
}
&.bottom,
&.bottom-right,
&.bottom-left {
.arrow {
border-bottom-color: var(--color-neutral-10);
&::after {
border-bottom-color: var(--color-neutral-10);
}
}
}
}
}
.community-translator__modal {
max-width: 400px;
}
.community-translator__highlight {
position: absolute;
left: 0;
top: 0;
z-index: 1000;
margin: -10px;
padding: 10px;
outline: 1000vw solid rgba(0, 0, 0, 0.5);
box-shadow: 0 5px 10px 5px rgba(0, 0, 0, 0.25);
pointer-events: none;
transition: all 0.2s;
}
.community-translator__bar {
z-index: 1000;
background: var(--studio-orange);
border-color: var(--studio-orange-80);
&-form {
flex: 1 1 auto;
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: center;
padding: 4px 8px;
.button {
flex: 0 0 auto;
margin-left: 8px;
}
.form-text-input {
max-width: 500px;
}
}
&-label {
flex: 0 0 auto;
margin-right: 8px;
}
}
.has-deliverable-highlighted {
// Disable translatable strings highlight when deliverable is highlighted
.translator-translatable {
text-shadow: none !important;
}
#notices,
.environment-badge,
.community-translator {
display: none !important;
}
}
|