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
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,25 @@
2
2
title: Device Preview
3
3
---
4
4
5
+
import React from 'react';
6
+
import VideoPlayer from '@site/src/components/Video/player';
7
+
5
8
:::info Pro Feature
6
9
[Upgrade to Phoenix Code Pro](https://phcode.io/pricing) to access this feature.
7
10
:::
8
11
9
12
**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
13
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 -->
The right end of the Live Preview toolbar has a device-size button.
16
21
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).
17
22
18
-
<!-- Add an image here showing the device-size dropdown with the list of devices and CSS breakpoint entries -->
23
+

19
24
20
25
> 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.
21
26
@@ -28,15 +33,15 @@ Phoenix Code reads your page's stylesheets and picks up the media-query breakpoi
28
33
29
34
> 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.
30
35
31
-
<!-- Add an image here showing CSS breakpoint entries (@media labels) at the bottom of the device dropdown -->
32
-
33
36
## Width ruler
34
37
35
38
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`.
36
39
37
-
<!-- Add an image here showing the widthruler with tick marks, colored breakpoint bands, and the floating device label-->
40
+

38
41
39
42
### In Design Mode
40
43
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`.
44
+
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`.
45
+
In Design Mode, a **Fit to screen** option is also available in the device dropdown. This resizes the page to fit the available space in the Live Preview.
0 commit comments