Skip to content

Commit a4ad67e

Browse files
committed
feat: add hero video for styles bar doc
1 parent 28bbecc commit a4ad67e

1 file changed

Lines changed: 5 additions & 22 deletions

File tree

docs/02-Live Preview/03-styles-bar.md

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,40 @@ title: Styles Bar
33
slug: "/Pro Features/styles-bar"
44
---
55

6+
import VideoPlayer from '@site/src/components/Video/player';
7+
68
:::info Pro Feature
79
[Upgrade to Phoenix Code Pro](https://phcode.io/pricing) to access this feature.
810
:::
911

1012
The **Styles Bar** lets you style elements visually right inside the Live Preview, and it automatically syncs your code in real time.
1113
When you select an element in [Edit Mode](./live-preview-edit), a bar appears at the bottom of the Live Preview with controls for **fonts**, **colors**, **borders**, **spacing**, **layout**, and more.
1214

13-
<!-- TODO: PLUTO - add video here showing the styles bar in action -->
15+
<VideoPlayer
16+
src="https://docs-images.phcode.dev/videos/styles-bar/styles-bar-hero.mp4"
17+
/>
1418

1519
> The controls shown depend on the selected element. For example, text controls are not shown for images.
1620
1721
You can move the bar to the top of the Live Preview using the **dock button** at the right end of the bar.
1822

19-
<!-- TODO: PLUTO - add image here showing the dock button -->
20-
2123
## Save Changes To
2224

2325
Phoenix Code gives you control to choose where you want to save your edits. By default, all the changes are saved directly on the element as an inline style. If you want to save the changes in one of the CSS rules, you can click on the **Save changes to** button:
24-
<!-- TODO: PLUTO - add image here showing the save changes to button -->
2526

2627
It shows all the available selectors for that element. Select the one you want, and all the changes made to that element will automatically get saved in that selector.
2728
> Each selector also shows the number of elements it affects on the page.
2829
29-
<!-- TODO: PLUTO - add image here showing the affects x elements -->
30-
3130
### Creating a New Rule
3231

3332
Click **Create new rule…** to save your edits in a new CSS rule. Type a class like `.card` or an id like `#hero` and click **Create**. Phoenix Code creates the rule and also adds the class or id to the element, so the rule applies right away.
3433

35-
<!-- TODO: PLUTO - add video here showing the new rule creation -->
36-
3734
### Editing Element States
3835

3936
The **State** dropdown in the popover lets you style the element's `hover`, `focus`, and `active` states. Pick a state and the Live Preview turns it on while you edit, with a banner showing which state you are editing.
4037

4138
For any other state, type it in the **Create new rule** field, for example `.button:disabled`.
4239

43-
<!-- TODO: PLUTO - add video of editing the hover state in the element -->
44-
4540
> States need a CSS rule to live in, so they are not available when saving to inline styles.
4641
4742
## Font Family
@@ -54,8 +49,6 @@ Opens a font picker with three tabs:
5449

5550
Fonts already used on the page appear in an **On this page** group, so you can reuse them quickly.
5651

57-
<!-- TODO: PLUTO - add image here showing the font family popover -->
58-
5952
## Font Size
6053

6154
Sets the font size. Type a value or use the **+/-** buttons. Click the unit button to switch between `px`, `em`, `rem`, and `%`, and the value is converted to the new unit automatically.
@@ -83,8 +76,6 @@ The **Spacing** tab:
8376

8477
To learn more about these properties, see [MDN's text styling guide](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Text_styling/Fundamentals).
8578

86-
<!-- TODO: PLUTO - add image here showing the text style popover -->
87-
8879
> Looking for bold? Use the font weight slider.
8980
9081
## Background Color
@@ -96,8 +87,6 @@ The **Background color** button shows the element's current background color. Cl
9687
- The **eyedropper** lets you pick a color from anywhere on the page.
9788
- **Swatches** shown on the left side displays all the colors already used in the page, plus a set of common colors.
9889

99-
<!-- TODO: PLUTO - add image here showing the background color picker -->
100-
10190
> The eyedropper is not available in Firefox, Safari and in the Linux desktop app.
10291
10392
## Text Color
@@ -123,8 +112,6 @@ The **Outline** tab has the same style, width, and color options, plus:
123112

124113
> An outline is drawn outside the element's border and takes up no space on the page.
125114
126-
<!-- TODO: PLUTO - add image here showing the border and outline popover -->
127-
128115
## Box Model
129116

130117
The popover has three tabs, **Size**, **Padding**, and **Margin**. They sit together because they measure one element from the inside out.
@@ -146,8 +133,6 @@ The button in the center of the frame controls how the sides are linked:
146133

147134
Linked fields are color coded so you can see which sides move together.
148135

149-
<!-- TODO: PLUTO - add image here showing the box model popover -->
150-
151136
## Layout
152137

153138
The popover has two tabs, **Display** and **Position**.
@@ -164,8 +149,6 @@ The **Position** tab:
164149

165150
To learn more about these properties, see MDN's guides on [display](https://developer.mozilla.org/en-US/docs/Web/CSS/display) and [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position).
166151

167-
<!-- TODO: PLUTO - add image here showing the layout popover -->
168-
169152
## When a Change Is Overridden
170153

171154
Sometimes a more specific CSS rule wins over the rule you are editing, so your change has no visible effect. In that case, Phoenix Code automatically adds `!important` to your change to make it take effect.

0 commit comments

Comments
 (0)