Espresso

Xray

Xray shows you why an element of a page looks the way it does: its size and spacing, and every style rule that applies to it.

Turn on Xray in any Espresso preview by clicking the eye at the left of the address field or by choosing Preview ⟩ Show Xray (option command X). With Xray on, click any element on the page to highlight it and see:

The address field is replaced with the path to the selected element through the page, each step written as you would write it in a selector, such as div#main.wide. Click any step to select that element instead.

While Xray is on, you will not be able to interact with the page normally. Click the eye again to turn it off.

The Xray panel

When you turn on Xray, the Xray panel opens: a small panel that floats over the window. For the element you have clicked it shows a summary:

These are the values the browser ended up with, whichever rules they came from.

Below the summary is every style sheet with rules that apply to the element. Under each rule are the properties it sets:

Click a rule to go straight to it in your CSS source. This works for the style sheets of your project and for a style sheet you have overridden with a local one, even when the source is SCSS or LESS. For a style sheet on a website that you have not overridden, Espresso offers to override it.

Right clicking an element

With Xray on, right click an element for a menu with its applied styles and:

Xray in other browsers

Xray also works in a project preview that you have open in another browser. Press option command X in the browser to turn it on, and click an element. The Xray panel stays in front of the browser and shows the element you clicked.