When building a Stylable application, you want to share definitions between parts of the application and consume 3rd party Stylable component libraries.
It is recommended to have a project commons stylesheet that includes:
- Shared common CSS definitions between parts of the project:
An application would define CSS with the final style definitions:
The Stylable component best practices guide describes ways to design a good component that can be styled. However, when building your application, it is also common to define components with their final CSS. This makes them less "themable", but is much simpler.
In the following code you can see a component that is described with:
- 2 colors used from project
- 1 component variant