You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/07-Pro Features/06-device-preview.md
+9-16Lines changed: 9 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,44 +6,37 @@ title: Device Preview
6
6
[Upgrade to Phoenix Code Pro](https://phcode.io/pricing) to access this feature.
7
7
:::
8
8
9
-
**Device Preview** lets you check how your page looks at different screen widths without leaving Phoenix Code. Resize the Live Preview to common device sizes, snap to the CSS breakpoints from your stylesheets, or drag the panel edge to see a width ruler with tick marks and breakpoint bands.
9
+
**Device Preview** lets you check how your page looks at different screen widths without leaving Phoenix Code. This is useful for testing responsive designs and debugging CSS media queries.
10
10
11
11
<!-- Add an image here showing the Live Preview toolbar with the device-size button on the right and the width ruler visible during a resize -->
12
12
13
13
## Choosing a device size
14
14
15
15
The right end of the Live Preview toolbar has a device-size button.
16
-
17
-
- Click the **device icon** to cycle through phone, tablet, and desktop widths.
18
-
- Click the **chevron** beside it to open the full device list.
16
+
You can click on the device icon to switch between mobile, tablet and desktop sizes. For more specific sizes, click the dropdown arrow to open a list of predefined devices and CSS breakpoints (from your stylesheets).
19
17
20
18
<!-- Add an image here showing the device-size dropdown with the list of devices and CSS breakpoint entries -->
21
19
22
-
The dropdown lists predefined devices grouped by category (iPhone SE, iPhone 14, Galaxy S24, iPad Mini, iPad Air, iPad Pro, HD Desktop, Laptop, Desktop, Full HD), plus a **Fit** option in design mode that fills the available space. A check mark shows next to the size that matches the current width.
23
-
24
-
> Free users see the device list, but selecting any size opens a Pro upgrade prompt. Device Preview is a Phoenix Pro feature.
20
+
> Some devices might not be available if your screen is too narrow to fit the Live Preview at that size. In that case, you can try zooming out (`Ctrl/Cmd + -`) to make more space for the preview.
25
21
26
22
## CSS breakpoints
27
23
28
-
Phoenix Code reads your page's stylesheets and picks up any `min-width` or `max-width` media-query breakpoints. These show up in two places:
24
+
Phoenix Code reads your page's stylesheets and picks up the media-query breakpoints. These show up in two places:
29
25
30
26
- In the **device dropdown**, listed at the bottom as `@media 768px` (etc.). Clicking one snaps the Live Preview to that exact width.
31
27
- On the **width ruler**, as colored bands between breakpoints, each labelled with its pixel value.
32
28
33
-
Breakpoints update automatically as you edit your CSS.
29
+
> When you edit your CSS and change the breakpoints, Phoenix Code updates the device dropdown and width ruler in real time. This makes it easy to test your responsive design as you work.
34
30
35
31
<!-- Add an image here showing CSS breakpoint entries (@media labels) at the bottom of the device dropdown -->
36
32
37
33
## Width ruler
38
34
39
-
When you drag the edge of the Live Preview panel to resize it, a ruler appears across the toolbar showing:
35
+
While you drag the edge of the Live Preview panel, a ruler appears across the toolbar with tick marks and colored bands for each of your breakpoints. A label above the preview shows the current width and the closest matching device, like `iPad Mini — 768px`.
40
36
41
-
-**Tick marks** every 10px, with numbers every 100px.
42
-
-**Colored bands** for each CSS breakpoint range (see [CSS breakpoints](#css-breakpoints) above).
43
-
-**A blue line** at the right edge marking the current width.
37
+
<!-- Add an image here showing the width ruler with tick marks, colored breakpoint bands, and the floating device label -->
44
38
45
-
A small black label floats above the preview showing the current width and the closest matching device, like `iPad Mini — 768px`. The label also flashes briefly when you pick a size from the device dropdown.
39
+
### In Design Mode
46
40
47
-
The ruler disappears as soon as you stop resizing.
41
+
In [Design Mode](./edit-mode-live-preview), the Live Preview takes over the full window. In that case, you'll see resize handles directly on the page: drag the left or right handle to change the **width**, or drag the bottom handle to change the **height**. The same ruler appears, and the label now shows both dimensions, like `iPad Mini — 768px × 1024px`.
48
42
49
-
<!-- Add an image here showing the width ruler with tick marks, colored breakpoint bands, the blue right-edge marker, and the floating device label -->
0 commit comments