Skip to content

Commit e326291

Browse files
authored
Merge pull request #262 from yel-hadd/master
STAR-258: update styling for virtual assistant widget tooltip
2 parents c7c93e9 + 9131f33 commit e326291

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

docs/.vuepress/components/Chat.vue

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
</button>
3131

3232
<div v-if="!showChat" class="highlight-container">
33-
<div class="tooltip-text"><b>Need help?</b><br>I'm an AI chatbot, trained to answer all your questions.</div>
33+
<div class="tooltip-text">
34+
<div class="tooltip-title"><b>Need help?</b></div>
35+
<div class="tooltip-subtitle">I'm an AI chatbot, trained to answer all your questions.</div>
36+
</div>
3437
</div>
3538
</div>
3639

@@ -195,11 +198,10 @@ mobile-breakpoint = 768px
195198
.highlight-container {
196199
position: absolute;
197200
bottom: calc(100% + 15px);
198-
left: 50%;
199-
transform: translateX(-35%);
201+
right: 0;
200202
display: flex;
201203
flex-direction: column;
202-
align-items: center;
204+
align-items: flex-end;
203205
pointer-events: none;
204206
z-index: 10001;
205207
max-width: 90vw;
@@ -214,15 +216,20 @@ mobile-breakpoint = 768px
214216
animation: float 3s ease-in-out infinite;
215217
position: relative;
216218
text-align: right;
217-
white-space: normal;
218219
font-weight: 500;
219220
box-shadow: 0 0 15px $primary-color;
220-
max-width: 250px;
221-
min-width: 200px;
222221
overflow: visible;
223222
text-overflow: clip;
224223
}
225224
225+
.tooltip-title {
226+
margin-bottom: 4px;
227+
}
228+
229+
.tooltip-subtitle {
230+
white-space: nowrap;
231+
}
232+
226233
.chat-container {
227234
position: fixed
228235
border-radius: $border-radius
@@ -360,10 +367,10 @@ mobile-breakpoint = 768px
360367
361368
@keyframes float {
362369
0%, 100% {
363-
transform: translateY(0) translateX(-50%)
370+
transform: translateY(0)
364371
}
365372
50% {
366-
transform: translateY(-4px) translateX(-50%)
373+
transform: translateY(-4px)
367374
}
368375
}
369376
@@ -383,17 +390,17 @@ mobile-breakpoint = 768px
383390
384391
.highlight-container {
385392
bottom: calc(100% + 15px)
386-
right: auto
387-
left: 50%
388-
transform: translateX(-40%)
393+
right: 0
389394
}
390395
391396
.tooltip-text {
392397
font-size: 0.9rem; /* Adjust this value to change the tooltip text size on mobile devices */
393398
padding: 10px 16px;
394-
white-space: normal;
395399
max-width: 90vw;
396-
min-width: 180px;
400+
}
401+
402+
.tooltip-subtitle {
403+
white-space: nowrap;
397404
}
398405
}
399406
</style>

0 commit comments

Comments
 (0)