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

Missing CSS named colors #1004

Closed
AlexisTessier opened this issue Jul 30, 2023 · 0 comments
Closed

Missing CSS named colors #1004

AlexisTessier opened this issue Jul 30, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@AlexisTessier
Copy link
Contributor

AlexisTessier commented Jul 30, 2023

Describe the bug
Some css named colors are not correctly parsed.

To Reproduce
I have a PR ready to fix the issue, with a related test file (#1005).

However, for the record, here is how I initially identified the issue:

const elementA = document.createElement('div')
elementA.style.border = '3px antiquewhite solid'
elementA.style.borderColor = 'green'

// With most of the css named colors (here "antiquewhite"), the following assertion passes.
expect(elementA.getAttribute('style')).toStrictEqual('border: 3px solid green;')

const elementB = document.createElement('div')
elementB.style.border = '3px aliceblue solid'
elementB.style.borderColor = 'green'

// With some of the css named colors (here "aliceblue"), the following assertion fails.
// Style attribute is actually "border-color: green;"
expect(elementB.getAttribute('style')).toStrictEqual('border: 3px solid green;')

Expected behavior
I expect all css named colors to be correctly parsed

@AlexisTessier AlexisTessier added the bug Something isn't working label Jul 30, 2023
AlexisTessier added a commit to AlexisTessier/happy-dom that referenced this issue Jul 30, 2023
AlexisTessier added a commit to AlexisTessier/happy-dom that referenced this issue Jul 30, 2023
AlexisTessier added a commit to AlexisTessier/happy-dom that referenced this issue Aug 2, 2023
capricorn86 added a commit that referenced this issue Aug 2, 2023
…-named-colors

#1004@patch: Fix missing css named colors.
capricorn86 pushed a commit to maxmilton/happy-dom that referenced this issue Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants