Getting started
Resources
Flex
Spacing
Layout
Size
Typography
Background
Border
Transition
When overriding any default values in Doddle USS, it is recommended to create duplicate files of the current theme file hierarchy doddle-config.tss
, doddle-palette.tss
, and your theme file whether it is doddle-default.tss
or not. The original files can be edited, but creating duplicates creates an update safe override that still inherits from Doddle USS' default values.
Default Theme File Inheritance
Override Theme File Inheritance
To customize the utility class library, you can either create new classes manually, or use the utility class editor window.
In the Utility Editor, classes are defined using the format:
Class Name
- The name of the class in the uss fileInstances
- The number of instances the class will be duplicated. The value
will be incremented by value
for each instance, and append the current value to the class nameName
- The name of the property in the class such as margin
Value
- The value of the property in the class. This value will be incremented if instances > 1
Unit
- The unit of the value such as px/%
In the example below, the class name will be .m-[value*instance]
with the contents of margin: [value*instance]px
. This will be repeated instance number of times. Instances 1 to 3 are displayed below.
USS
Editor performance for the utility editor window is poor since it regenerates all property foldouts for each class on save/restore/import/export. In editor performance improvements are planned for future updates.
doddle-utility.uss
with the current changes overwriting valuesdoddle-utility.uss
and export to doddle-utility-export.json
doddle-utility.uss
from the contents of doddle-utility-import.json
To customize the colour palette, it is recommended to create a duplicate of Doddle USS' doddle-palette.tss
file. This creates an update safe override that still inherits from Doddle USS' default values.
doddle-palette.tss
, and change the values in the new theme style sheetdoddle-palette.tss
in the 'Inherited Themes' field of the newly created theme filedoddle-palette.tss
in the 'Inherited Themes' field of doddle-default.tss
doddle-default.tss
To customize the config file, it is recommended to create a duplicate of Doddle USS' doddle-config.tss
file. This creates an update safe override that still inherits from Doddle USS' default values. The config theme file is where font assets, default values for transitions, header font size, border width, and border radius are defined.
doddle-config.tss
, and change the values in the new theme style sheetdoddle-config.tss
in the 'Inherited Themes' field of the newly created theme filedoddle-config.tss
in the 'Inherited Themes' field of doddle-default.tss
doddle-default.tss
On this page