Skip to content

Commit 2a37ae4

Browse files
devvaannshabose
authored andcommitted
refactor: live preview toolbar buttons are misaligned
1 parent c382319 commit 2a37ae4

2 files changed

Lines changed: 44 additions & 26 deletions

File tree

src/extensionsIntegrated/Phoenix-live-preview/live-preview.css

Lines changed: 43 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -375,14 +375,49 @@
375375
color: rgba(100, 180, 255, 0.8);
376376
}
377377

378-
.lp-mode-btn-group {
378+
.lp-toolbar-left {
379+
width: 20%;
379380
display: flex;
380381
align-items: center;
382+
gap: 6px;
383+
padding-left: 6px;
384+
box-sizing: border-box;
381385
flex-shrink: 0;
382-
margin: 0 4px 0 3px;
386+
}
387+
388+
#reloadLivePreviewButton,
389+
#designModeToggleLivePreviewButton {
390+
width: 28px;
391+
height: 24px;
392+
margin: 0;
393+
padding: 0;
394+
display: flex;
395+
align-items: center;
396+
justify-content: center;
397+
background: transparent;
398+
color: #a0a0a0;
399+
border: 1px solid transparent;
400+
border-radius: 3px;
401+
box-sizing: border-box;
402+
flex-shrink: 0;
403+
}
404+
405+
#live-preview-plugin-toolbar #reloadLivePreviewButton:hover,
406+
#live-preview-plugin-toolbar #designModeToggleLivePreviewButton:hover {
407+
border-color: rgba(255, 255, 255, 0.1) !important;
408+
background: transparent !important;
409+
box-shadow: none !important;
410+
}
411+
412+
.lp-mode-btn-group {
413+
display: flex;
414+
align-items: stretch;
415+
height: 24px;
416+
margin: 0;
383417
border: 1px solid transparent;
384418
border-radius: 3px;
385419
box-sizing: border-box;
420+
flex-shrink: 0;
386421
}
387422

388423
.lp-mode-btn-group:hover {
@@ -393,8 +428,8 @@
393428
display: flex;
394429
align-items: center;
395430
justify-content: center;
396-
width: 22px;
397-
height: 22px;
431+
width: 24px;
432+
height: 100%;
398433
cursor: pointer;
399434
background: transparent;
400435
box-shadow: none !important;
@@ -420,16 +455,17 @@
420455
display: flex;
421456
align-items: center;
422457
justify-content: center;
458+
width: 14px;
459+
height: 100%;
423460
cursor: pointer;
424461
background: transparent;
425462
box-shadow: none !important;
426463
border: none;
427464
border-left: 1px solid transparent;
428-
border-radius: 0 3px 3px 0;
465+
border-radius: 0;
429466
color: #a0a0a0;
430-
padding: 0 4px;
467+
padding: 0;
431468
margin: 0;
432-
height: 22px;
433469
font-size: 10px;
434470
}
435471

@@ -446,24 +482,6 @@
446482
box-shadow: none !important;
447483
}
448484

449-
#reloadLivePreviewButton {
450-
color: #a0a0a0;
451-
margin-left: 3px;
452-
margin-top: 0;
453-
width: 30px;
454-
height: 22px;
455-
flex-shrink: 0;
456-
}
457-
458-
#designModeToggleLivePreviewButton {
459-
color: #a0a0a0;
460-
margin-left: 3px;
461-
margin-top: 0;
462-
width: 30px;
463-
height: 22px;
464-
flex-shrink: 0;
465-
}
466-
467485
.live-preview-status-overlay {
468486
display: flex;
469487
flex-direction: row;

src/extensionsIntegrated/Phoenix-live-preview/panel.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div id="panel-live-preview">
22
<div id="live-preview-plugin-toolbar" class="plugin-toolbar" style="display: flex; align-items: center; flex-direction: row;">
3-
<div style="width: 20%;display: flex;">
3+
<div class="lp-toolbar-left">
44
<button id="reloadLivePreviewButton" title="{{clickToReload}}" class="btn-alt-quiet toolbar-button">
55
<i class="fa-solid fa-arrow-rotate-right"></i>
66
</button>

0 commit comments

Comments
 (0)