We recommend using these classes to style your designs. Not only are these
classes implemented in the @freesewing/plugin-theme
plugin, they are also
properly styled in our own frontends. Furthermore, by using a common set
of class names, anyone can adapt the styling to suit their own needs.
It is this styling that you will see below. What the various classes exactly look like will depend on the environment where you use FreeSewing, because in-browser styling or SVG/PDF styling is slightly different. But what doesn’t change is the names of the classes and their purpose.
Contextual colors
These are the main classes that you typically want to use.
The will set either the stroke
or fill
property, depending on the element you set them on.
For example, when you use these classes on a path, they will set the stroke
property.
But if you use them on text, they will set the fill
property.
Which is typically what you want.
Stroke colors
These classes set the stroke
property explicitly.
Fill colors
These classes set the stroke-fill
property. Note that we’ve applied a background
to ensure the text remains readable.
Stroke styles
These classes set the stroke-dasharray
property.
Stroke widths
These classes set the stroke-width
property.
The default width is shown at the top.
Font size
These classes set the stroke-width
property.
The default width is shown at the top.
Text alignment
These classes set the text-anchor
property.
The default align is to the left (text-anchor: start;
).
Bold and italic text
Various:
.no-stroke
: Do not stroke the element.no-fill
: Do not fill the element