Scaling
Change the density of your application.
Often times users have a preference for the percieved size of elements in their application. Winnie supports this concept via the data-scale
attribute. The scaling attribute modifies css values which affect the overall density of the layout in the application.
Scaling Factor
Winnie provides a scaling factor token that you can use to create custom components that adhere to the overall density of your application.
Scaling factors can be used with the calc
function in css. By default all space
, font-size
, line-height
, border-width
, and border-radius
have scale calculated for them.
Example
Putting this all together, we can create a component that scales across the different factors seamlessly.