Skip to content

Commit b8e2c4c

Browse files
committed
feat: add toggle support in the live preview resize ruler feature
1 parent 1791ace commit b8e2c4c

2 files changed

Lines changed: 48 additions & 9 deletions

File tree

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

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,31 +109,68 @@
109109
margin-top: 0;
110110
}
111111

112+
.lp-device-size-btn-group {
113+
display: flex;
114+
align-items: center;
115+
flex-shrink: 0;
116+
margin: 0 4px 0 3px;
117+
border: 1px solid transparent;
118+
border-radius: 3px;
119+
box-sizing: border-box;
120+
}
121+
122+
.lp-device-size-btn-group:hover {
123+
border-color: rgba(255, 255, 255, 0.1);
124+
}
125+
112126
.lp-device-size-icon {
113127
min-width: fit-content;
114128
display: flex;
115129
align-items: center;
116-
margin: 0 4px 0 3px;
117130
cursor: pointer;
118131
background: transparent;
119-
box-shadow: none;
120-
border: 1px solid transparent;
121-
box-sizing: border-box;
132+
box-shadow: none !important;
133+
border: none;
122134
color: #a0a0a0;
123135
padding: 0 0.35em;
136+
margin: 0;
124137
}
125138

126139
.lp-device-size-icon:hover,
127140
.lp-device-size-icon:focus,
128141
.lp-device-size-icon:active {
129-
background: transparent !important;
130-
border: 1px solid rgba(255, 255, 255, 0.1) !important;
142+
background: rgba(255, 255, 255, 0.06) !important;
143+
border: none !important;
131144
box-shadow: none !important;
132145
}
133146

134-
#deviceSizeBtn.btn-dropdown::after {
135-
position: static;
136-
margin-left: 5px;
147+
.lp-device-size-dropdown-chevron {
148+
display: flex;
149+
align-items: center;
150+
justify-content: center;
151+
cursor: pointer;
152+
background: transparent;
153+
box-shadow: none !important;
154+
border: none;
155+
border-left: 1px solid transparent;
156+
color: #a0a0a0;
157+
padding: 0 4px;
158+
margin: 0;
159+
height: 22px;
160+
font-size: 10px;
161+
}
162+
163+
.lp-device-size-btn-group:hover .lp-device-size-dropdown-chevron {
164+
border-left-color: rgba(255, 255, 255, 0.1);
165+
}
166+
167+
.lp-device-size-dropdown-chevron:hover,
168+
.lp-device-size-dropdown-chevron:focus,
169+
.lp-device-size-dropdown-chevron:active {
170+
background: rgba(255, 255, 255, 0.06) !important;
171+
border: none !important;
172+
border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
173+
box-shadow: none !important;
137174
}
138175

139176
.device-size-item-icon {

src/nls/root/strings.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,8 @@ define({
525525
"AVAILABLE_IN_PRO_TITLE": "Available in Phoenix Pro",
526526
"DEVICE_SIZE_LIMIT_MESSAGE": "See how your page looks on phones, tablets, desktops, and your CSS breakpoints. Upgrade to Phoenix Pro.",
527527
"DEVICE_SIZE_NOT_ENOUGH_SPACE": "Not enough space in the editor window for this screen size. Try zooming out.",
528+
"DEVICE_SIZE_CYCLE_TOOLTIP": "Switch between mobile, tablet, and desktop",
529+
"DEVICE_SIZE_DROPDOWN_TOOLTIP": "All device sizes",
528530
"MD_EDIT_UPSELL_MESSAGE": "Write Markdown like a document. {APP_NAME} handles the formatting so you can stay focused on writing.",
529531
"IMAGE_UPLOADING": "Uploading",
530532
"IMAGE_UPLOAD_FAILED": "Failed to upload image",

0 commit comments

Comments
 (0)