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

Implement legacyCSS option #119

Merged

Conversation

elchininet
Copy link
Owner

This pull request implements a new option for the class instantiation and the static methods. legacyCSS, if this option is true, css output will be in CSS Level 3, otherwise it will be CSS Level 4. If the option is not provided the library tries to extract this iformation from the color provided.

ColorTranslator.toHSLA('rgb(255 0 255)'); // hsl(300 100% 50% / 1)
ColorTranslator.toHSLA('rgb(255,0,255)'); // hsla(300,100%,50%,1)
ColorTranslator.toHSLA(
    'rgb(255 0 255)',
    { legacyCSS: true }
); // hsla(300,100%,50%,1)

@elchininet elchininet self-assigned this Jul 12, 2023
@elchininet elchininet mentioned this pull request Jul 12, 2023
11 tasks
@elchininet elchininet merged commit 3048239 into implement_full_css_level_4_support Jul 12, 2023
1 check passed
@elchininet elchininet deleted the implement_legacy_mode_option branch July 12, 2023 23:53
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.

1 participant