Element code and the code dock

For designers and developers. Open the CSS and markup behind the selected element under the page, edit it with a live preview, and save it as one step to undo.

Every field in the style panel writes real code into your site. When you want to see it, or change something no field covers, open the code dock.

Open the dock

Select an element and press ⌥C, or click </> in the panel's header. Press it again to close. The dock follows your selection. With nothing selected it shows Base styles: the rules for the whole site, like html, body and links.

Rules

Every rule that styles the element, grouped by file: your site's styles first, then the design system's. Inherited and site-wide rules are folded below. Filter them, or add a + New rule; the dock checks whether the new rule will win.

Click a rule to edit it. Its file, line and where it applies are above the code. The page previews as you type; saving makes it one step to undo, and Esc throws the edit away. Design system rules are read-only here; change them in the Style guide.

Variables and attributes

Variables lists the variables the element reads, with their values. Attributes lists its HTML attributes, with suggestions for names and values your site already uses. Dangerous attributes, like on… handlers and javascript: links, aren't allowed.

Markup

The element's source in its file, with the lines around it. Edit unlocks it; Copy and Ask agent to change it are next to it. When the element sits in a shared part, like the layout, the tab says the change shows on every page.

Saving changes only the edited piece: the file's formatting and comments stay as they were.

The element menu

⋯ in the panel's header holds the element's actions: Duplicate, Delete, Change tag… (H1–H6, paragraph, section, article, nav… keeping its look), an anchor so links can jump to it, making a whole block a link, Decorative, Attributes… and Show CSS.

For developers The files behind a site and what's code versus data: Project structure.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.