Skip to content

Use semantic theme color variables, including global primary/secondary colors #19467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Brengineer
Copy link

@Brengineer Brengineer commented Nov 29, 2018

Description (*)

This PR updates instances of the predominant blue and orange colors in the Blank and Luma themes to use more semantic variables.
Additionally, it implements global primary and secondary theme colors to make basic global theme changes much easier and more reliable.
There are no visual changes to the default themes on the frontend (except a couple fixes for minor inconsistencies in Luma), and all existing variables (such as button colors) can still be redefined just as before.
However, setting new brand colors in child themes is now much easier and requires fewer code changes.

Fixed Issues

Preconditions

  1. Magento 2.x
  2. A custom theme which extends from either Magento/blank or Magento/luma

Steps to reproduce

  1. In the custom theme, create web/css/source/_theme.less
  2. Redefine @active__color

Expected result

  1. All elements which use @color-orange-red1 for their active state should be updated to use the new active color.

Actual result

  1. In many instances, the orange color persists. Examples: Active item border in account sidebar, active thumbnail in PDP image gallery, active checkout step. (This includes obscure places, such as the selected address for a user with multiple addresses in the shipping step in checkout.)

Manual testing scenarios (*)

  1. Create a custom theme which extends from either Magento/blank or Magento/luma
  2. In the custom theme, create web/css/source/_theme.less
  3. Redefine @theme__color__primary, @theme__color__primary-alt, and @theme__color__secondary.
  4. Redeploy static content
  5. Confirm that all instances of default blue and orange have been updated to use new colors (e.g. active item border in account sidebar, active thumbnail in PDP image gallery, active checkout step, etc.)

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Nov 29, 2018

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Contributor

Hi @Brengineer. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.1 milestone Nov 30, 2018
@magento-engcom-team
Copy link
Contributor

Hi @VladimirZaets, thank you for the review.
ENGCOM-3596 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

@Brengineer thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@magento-engcom-team magento-engcom-team merged commit 49b8e66 into magento:2.3-develop Jan 4, 2019
@ghost
Copy link

ghost commented Jan 4, 2019

Hi @Brengineer, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

magento-engcom-team pushed a commit that referenced this pull request Jan 4, 2019
@magento-engcom-team
Copy link
Contributor

Hi @Brengineer. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants