Skip to content

Conversation

JakeQZ
Copy link
Collaborator

@JakeQZ JakeQZ commented Jan 25, 2025

The only percentage values that could be reliably converted to hex notation are 0%, 20%, 40%, etc.
It's beyond the scope of this library to do that.

Also add additional tests to confirm parsing of percentage values. Some of these are commented out, because the input data would result in rendering in an invalid format. (The "legacy" syntax does not allow a mixture of percentages and numbers, so it would be necessary to implement rendering in the "modern" syntax to resolve those cases, which is beyond the scope of this PR.)

@JakeQZ JakeQZ added bug css4 Relating to features introduced in CSS4 labels Jan 25, 2025
@JakeQZ JakeQZ self-assigned this Jan 25, 2025
@coveralls
Copy link

coveralls commented Jan 25, 2025

Coverage Status

coverage: 42.138% (+0.2%) from 41.942%
when pulling 8df0e63 on bugfix/rgb-percentage-render
into 98c8bb8 on main.

The only percentage values that could be reliably converted to hex notation are 0%, 20%, 40%, etc. It's beyond the scope of this library to do that. Also add additional tests to confirm parsing of percentage values. Some of these are commented out, because the input data would result in rendering in an invalid format. (The "legacy" syntax does not allow a mixture of `percentage`s and `number`s, so it would be necessary to implement rendering in the "modern" syntax to resolve those cases, which is beyond the scope of this PR.)
@JakeQZ JakeQZ force-pushed the bugfix/rgb-percentage-render branch from 4c740e3 to 8df0e63 Compare January 25, 2025 03:54
Copy link
Collaborator

@oliverklee oliverklee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@oliverklee oliverklee merged commit 540b315 into main Jan 25, 2025
21 checks passed
@oliverklee oliverklee deleted the bugfix/rgb-percentage-render branch January 25, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug css4 Relating to features introduced in CSS4

3 participants