CSS Template
A template for CSS for the selected element
Last updated
Was this helpful?
A template for CSS for the selected element
Last updated
Was this helpful?
Web Export creates the CSS needed to make the element match what is seen in Adobe XD.
You can add your own CSS by using the in the Element Options form.
You can also add additional CSS, CSS selectors in the CSS template field. You can also replace existing exported CSS using a special token in the CSS template field.
For adding or changing a few styles use the field.
To add additional CSS or CSS Selectors select the Element. open the Element Properties panel and click on the CSS template icon:
By default the template is empty.
For an element you can add more CSS here and it will be added directly after element page style declaration.
You can use special tokens to get the name and values of the selected element.
Two important tokens are SELECTOR and SELECTOR2.
SELECTOR - the primary class name or id of the selected element
SELECTOR2 - the secondary class name or id of the selected element (if any)
For example, when you enter the following CSS in the CSS template:
This is what is exported:
You can use the no styles
token to prevent the default styles from being exported.
If you have the Artboard selected the tokens and the rules are slightly different.
Element token list
Token Text
If you find you want to exclude all default CSS styling and style everything yourself you can use the Artboard option.
An example project showing template can be found .
View the for more information.