Skip to content
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

Don't apply default colors in the colors plugin when defaults are used #11927

Conversation

LeeLenaleee
Copy link
Collaborator

Resolves: #11914

@LeeLenaleee LeeLenaleee added this to the Version 4.5.0 milestone Oct 12, 2024
@LeeLenaleee LeeLenaleee changed the title Add check to colors plugin if defaults are set Don't apply default colors in the colors plugin when defaults are used Oct 12, 2024
@SteveByerly
Copy link

Note that this fix relies on matching the string values being used on the Default class ctor in core/defaults.

This runs the risk of breaking if those strings ever change, even if the color values do not change, for example if spaces were added 'rgba(0, 0, 0, 0.1)'.

export class Defaults {
constructor(_descriptors, _appliers) {
this.animation = undefined;
this.backgroundColor = 'rgba(0,0,0,0.1)';
this.borderColor = 'rgba(0,0,0,0.1)';

@LeeLenaleee
Copy link
Collaborator Author

I don't think that those values or formatting will change. And if it will change the test will break, so you need to revert it or update the colors plugin.

So this should never break this fix unless the test is removed

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.

backgroundColor not working in defaults
3 participants