Thank you for reaching the contribution page and showing interest in Picto.
You came to the right place to start your contribution!
This is a very important one, in order to properly support current and future features of Picto, it's important to closely follow the guidelines.
- Icons must be SVG.
- Icons viewbox should be 200x200px.
- Inner content should be up to 150px width, or height, whichever is higher.
- Tags shouldn't have any unnecessary attributes.
- Background has to be a
<rect>
. - Classes should only be used for non-background elements.
- Classes should be named following the pattern:
{icon_name}
--fragment-{n}
. - Gradients should always go inside a
<defs>
. - If the icon has more than one
<path>
, they should be grouped in a<g>
. - Naming the file should follow kebab-case, using only the name of the tool or language.
- Background should always have
--rx
,--filter
, and--bg
variables.
- Create the icon in any Vector Drawing Software of your liking.
- Avoid adding the background in this step.
- Export as SVG.
- Open the SVG in your editor and clean any useless code generated by the software.
- Create a
<rect>
to add the background. - Commit your wonderful contribution ✨
<svg width="200" height="200" version="1.1" viewBox="0 0 200 200" xml:space="preserve"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
</svg>
Background includes the fill and rx (rounded corner) properties as CSS variables.
- Default value for
bg
will be shown if no background has been set by the renderer. - Default value for
rx
is always24px
. --filter
has no default value.
<rect width="200" height="200" style="fill: var(--bg, #fff); rx: var(--rx, 24px); filter: var(--filter); filter: var(--filter);" />