Skip to content

Commit 733a86c

Browse files
committed
feat: add responsive handles live preview css
1 parent 4cabe6d commit 733a86c

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,48 @@
5050
height: calc(100% - var(--toolbar-height));
5151
}
5252

53+
.frame-container.responsive-viewport {
54+
justify-content: center;
55+
align-items: stretch;
56+
background: #1a1a1e;
57+
}
58+
59+
.frame-container.responsive-viewport > div:first-child:not(.responsive-handle) {
60+
display: none;
61+
}
62+
63+
.responsive-handle {
64+
width: 6px;
65+
cursor: ew-resize;
66+
background: transparent;
67+
flex-shrink: 0;
68+
position: relative;
69+
z-index: 5;
70+
transition: background 0.15s;
71+
}
72+
73+
.responsive-handle:hover,
74+
.responsive-handle.dragging {
75+
background: rgba(66, 133, 244, 0.5);
76+
}
77+
78+
.responsive-handle::after {
79+
content: '';
80+
position: absolute;
81+
top: 50%;
82+
left: 50%;
83+
transform: translate(-50%, -50%);
84+
width: 2px;
85+
height: 24px;
86+
border-radius: 1px;
87+
background: rgba(255, 255, 255, 0.25);
88+
}
89+
90+
.responsive-handle:hover::after,
91+
.responsive-handle.dragging::after {
92+
background: rgba(255, 255, 255, 0.6);
93+
}
94+
5395
.plugin-toolbar {
5496
height: var(--toolbar-height);
5597
color: #a0a0a0;

0 commit comments

Comments
 (0)