Styling elements

How to write CSS directly (Advanced tab)

How to write CSS directly (Advanced tab)

In TeleportHQ, the Advanced tab of the right panel lets you type CSS properties for the selected element, like in a browser's developer tools. Select the element, open Advanced, type a property and a value in the empty row, and click +. Use it for styles the Visual tab doesn't have, such as a pointer cursor, a grayscale filter or an inner shadow.

Before you start

  • The Advanced tab is available on every plan.
  • You need to know the CSS property you want, for example cursor. The fields suggest property names and values as you type.
  • Styles apply to one element. To reuse styles on many elements, use a CSS class. See How to edit a CSS class.

Steps

  1. On the canvas, click the element, for example a clickable card.
  2. At the top of the right panel, click Advanced. You can also press Ctrl+Shift+I (Cmd+Shift+I on Mac).
  3. Under Properties, click the empty row's property field and type cursor. Pick it from the suggestions.
  4. In the value field, type pointer.
  5. Click +, or press Enter.

The new row appears in the list. Press Esc to clear an unfinished row.

The Advanced tab of the TeleportHQ right panel, with the Properties section and its empty property and value row highlighted, and the first Screen section below

Check that it worked

The row shows in Properties, and the Visual tab shows the same value where it has a matching field. Some properties, like cursor and transition, only show their effect in Preview and on the published site.

What the Advanced tab shows

The Advanced tab in TeleportHQ lists the element's styles in sections, from top to bottom:

  • Attributes, Classes and States: the same as in the Visual tab. Click a state chip, for example hover, to type CSS for that state.
  • Properties: the element's own base styles, used at your default screen size and every smaller one. Styles that come from a CSS class aren't listed here.
  • Screen ≤ 991px, Screen ≤ 767px and so on: one section for each smaller screen size you have turned on. Styles here only apply at that width and smaller.

Edit, turn off or remove a style

Each row has:

  • a checkbox to turn the style off on the canvas for a moment, to compare (the row shows crossed out). The tick isn't saved: when you reload the editor, the row is ticked again and the style is back. Preview, your published site and downloaded code always use the style.
  • the property and value, which you can click to edit
  • × to remove it

To remove a style for good, click ×.

Move styles between screen sizes

A section that has styles shows three buttons next to its title:

  • Move all properties to larger breakpoint
  • Move all properties to smaller breakpoint
  • Remove all style properties for this breakpoint

For example, if you added styles under Properties that should only apply on phones, move them to a smaller screen size section.

Useful properties the Visual tab doesn't have

PropertyExample valueWhat it does
cursorpointerShows a hand when visitors point at the element
filtergrayscale(100%)Makes an image black and white
mix-blend-modemultiplyBlends the element with what's behind it
box-shadowinset 0 2px 6px rgba(0,0,0,0.2)An inner shadow
animationmyFade 1sPlays a keyframe animation you added in custom code

For animation, the keyframes must exist first. See How to add CSS keyframes or animation libraries with custom code.

The transition property (how long hover and other state changes take) also has its own Transition section in the Visual tab, where you pick the property, easing, duration and delay without typing CSS. When you add the first hover or other state to an element, TeleportHQ adds transition: 0.3s to it, unless it already has a transition of its own. See How to add a transition to an element.

Troubleshooting

"Editing or removing some properties of interactive nodes is not allowed." Interactive elements, such as sliders or dropdowns, control their own display property. Change their appearance with other properties, or hide them from the Visibility section.

A Screen ≤ px section has a warning color and an info icon "This breakpoint is not defined in your project. These styles still apply, but are at risk of being overwritten if you make changes to your breakpoint setup. Consider moving them to an existing breakpoint." Use the move buttons to put the styles in a screen size you use.

"This is a non-standard property. It is not recommended to use it on production sites, as it will not work for every user." The zoom property doesn't work in every browser. Use Scale in Transforms instead. See How to rotate, scale and move elements.

My change doesn't show on the canvas Effects like transition and cursor only work in Preview and on the published site. Also check the row isn't turned off with its checkbox.

The Transition section says "This transition uses a value this section cannot edit — change it in the Advanced tab." The transition holds something the Transition section can't show, such as a CSS variable. Edit the transition row here instead.

Good to know

  • The Properties section always shows a laptop icon, even if your default screen size is Desktop or Wide.
  • For bullets on lists, the Visual tab has a List Style section with Type (for example disc, square or decimal) and Position (outside or inside).
  • To add CSS that affects the whole site, for example a rule for many elements, use custom code instead. See How to add code to every page (head and body).
  • Value fields also offer your saved colors, sizes and CSS variables.
Share

Related Articles

How the style panel works (and where values come from)

When you select an element in TeleportHQ, the right panel shows its settings in Visual and Advanced tabs, always in the same order; values you set show in normal text, while grey values come from a CSS class, a larger screen size, a parent or the browser, and pointing at one shows where it comes from.

How to add hover and click effects (interaction states)

In TeleportHQ, select an element, open States in the right panel, click + and pick a state such as hover, then change the styles; they apply when a visitor hovers, clicks or focuses the element, at every screen size, and fade in with a 0.3-second transition you can change in the Transition section.

How to change styles for mobile only

In TeleportHQ, click a smaller breakpoint icon above the canvas (such as Mobile, 479px), select the element and change its style; the change applies to that screen size and smaller ones only, and you remove it with Reset Values on the blue section title.

How to add code to every page (head and body)

In the TeleportHQ editor, click the Project settings cog at the bottom of the left sidebar, open Data & code → Custom code, choose Head or Body and paste your script, style, meta or link tags; the code saves itself and runs on every page of your published site, but not on the editor canvas.

How to use CSS variables (Vars)

In TeleportHQ, open the Vars tab of the Design Language panel, create a category, click + to save any CSS value under a name, then pick that variable in a style field, a class property or the Advanced tab; editing it updates everything that uses it.