vmware-clarity / core

Clarity is a scalable, accessible, customizable, open-source design system built with web components. Works with any JavaScript framework, created for enterprises, and designed to be inclusive.
https://clarity.design
MIT License
166 stars 42 forks source link

fix(spacing): use base 20 fallback spacing logic #105

Closed ashleyryan closed 2 years ago

ashleyryan commented 2 years ago

use 20 instead of 16 - 20 is the default described in the docs allow for 16 to be set using --cds-global-base, even if the global css doesn't load

fixes vmware-clarity/ng-clarity#138

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

in v5, the fallback used a default base size of 20 - the default rem size for Clarity Core and NG. In v6, that changed to 16, the default rem size for browsers

Issue Number: vmware-clarity/ng-clarity#138

What is the new behavior?

Change the fall back to 20, and also bring back the calculation logic that will attempt to use the --cds-global-base size first, if it exists. This means that even if the app doesn't import all of the global CSS, they can still change their base rem size use --cds-global-base

Does this PR introduce a breaking change?

Other information

github-actions[bot] commented 2 years ago

👋 @ashleyryan,

Thank you,

🤖 Clarity Release Bot

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 6.0.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 2 years ago

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed PRs after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.