Version 1, Update 75
The Variable object has been extended with with the ability to read and define a variable's code syntax field. Code syntax allows you to represent design variables in code using custom, syntactically correct variable names to support a seamless handoff experience. It can be configured for different contexts, including CSS, SwiftUI, and Compose. A variable's code syntax will appear in Dev Mode's code snippets when inspecting elements using the variable.
New:
- Variable.codeSyntax describes the current code syntax of a variable.
- Variable.setVariableCodeSyntax and Variable.removeVariableCodeSyntax let you modify the the
codeSyntax
field.