<p>If you’re using the source version of Shoelace (i.e. not the CDN or <code>/dist</code> version), you can customize components using CSS variables. To add customizations, simply override one or more of the variables found in <ahref="../source/css/variables.css"><code>source/css/variables.css</code></a>.</p>
<p>You’re encouraged to use Shoelace’s variables in your own stylesheet. This makes it easy to reuse values without hardcoding them. It also provides a foundation for extending Shoelace with your own <ahref="#creating-custom-components">custom components</a>.</p>
<p>If you’re not familiar with CSS variables, <ahref="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables">this article</a> will bring you up to speed.</p>
<p><strong>Familiarize yourself with Shoelace’s naming conventions.</strong> A custom accordion component, for example, would have a class name such as <code>accordion</code>, modifier classes such as <code>accordion-xs</code>, and variable names that look like <code>--accordion-bg-color</code>. Try to follow the same patterns as much as possible.</p>
<p><strong>Define new variables when it makes sense to.</strong> Take a look at how existing components are defined. Many use core variables instead of hardcoded properties as default values. This makes it easy for users to customize things quickly, but still provides enough flexibility to style individual components.</p>
<p><strong>Provide source and dist versions.</strong> Many people use Shoelace as a tool for prototyping. If you’re open sourcing your component, it’s best to provide both source and dist versions. The dist version is just a minified version of the source after it’s been processed by cssnext.</p>
<p><strong>Semantic markup is strongly encouraged.</strong> Custom components should use the most appropriate elements and the minimal amount of markup required.</p>
<aclass="github-button"href="https://github.com/claviska/shoelace-css/fork"data-size="large"aria-label="Fork claviska/shoelace-css on GitHub">Fork</a>
<aclass="github-button"href="https://github.com/claviska/shoelace-css/releases"data-icon="octicon-cloud-download"data-size="large"aria-label="Download claviska/shoelace-css on GitHub">Download</a>
<aclass="github-button"href="https://github.com/claviska/shoelace-css/issues"data-icon="octicon-issue-opened"data-size="large"aria-label="Issue claviska/shoelace-css on GitHub">Report a Bug</a>
<aclass="github-button"href="https://github.com/claviska/shoelace-css"data-icon="octicon-star"data-size="large"data-show-count="true"aria-label="Star claviska/shoelace-css on GitHub">Star</a>