SAP / spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
Apache License 2.0
744 stars 389 forks source link

Dynamically removing css variables #1914

Closed LTiger14 closed 5 years ago

LTiger14 commented 5 years ago

In the move to a flannel v2 we will need to remove the majority of css variables (custom properties) to simplify our API.

This ticket is to:

LTiger14 commented 5 years ago

For using the script (development)

The script is located in ./scripts and is named remove-css-vars.ts. (you can see it here https://github.com/SAP/cloud-commerce-spartacus-storefront/blob/feature/GH-1914/scripts/remove-css-vars.ts)

In order to use it:

IMPORTANT NOTE Please remove the script before merging to develop.

LTiger14 commented 5 years ago

For the reviewer

Make sure the fallbacks are used instead of the variables e.g.

.some-class {
  text-align: var(--cx-text-align, center);
  color: var(--cx-color, var(--cx-g-color-primary));
}

becomes

.some-class {
  text-align: center;
  color: var(--cx-g-color-primary);
}

These should be the only changes.

In addition, please go through the site to make sure the look and feel is still the same. (Including mobile)

LTiger14 commented 5 years ago

For QA

Go through the site on Desktop, Tablet and Mobile making sure the style isn't broken.

KateChuen commented 5 years ago

Tested on dev17 (on laptop, using different viewports - did not test on actual tablet/phone -> Will be covered during exploratory testing).