-
Notifications
You must be signed in to change notification settings - Fork 429
Support extended color names in HTML 5 #908
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
Comments
@geoffmcl has prepared an array definition for the larger set; attached as colors4.c.zip |
@cqcallaw thanks for opening this issue... it has been long outstanding... When I prepared the colors4.c table I had the mad idea that we could just replaces the 16 color names, with the 148 color names, and all done... and still not sure how crazy that really is... I am sure browsers have done just that, and in several tests, they seem to support the full 148 names regardless of the DOCTYPE... and why not? And to my surprise, passing Of course, we could adjust my new table to put the 16 legacy color names at the top, then adjust What do you, or others, think about this? And the Looking forward to further feedback, comments, patches, PR, etc, on this issue... thanks... |
@geoffmcl There seems to be a high-level question of philosophy here: should tools like tidy conform to the specification, or should they conform to common browser behavior? I prefer validation tools that follow the spec closely, because of the regularity with which improving my knowledge of the spec improves my code. I'm just one user though; others might have a different perspective. |
@cqcallaw thanks for the quick feedback... much appreciated... Don't know what I was thinking... momentary lapse... sorry! Yes, absolutely, the And as you can read, probably many times, in these issues, the casting aside of common browser behavior as an invalid The only concession to browsers is, in tidying a document, removing, changing, fixing, re-lining, etc, etc, to try very hard to keep the same browser rendering... not always easy, and can vary between browsers... but important... So, as stated, looking forward to further feedback, comments, patches, PR, etc, on this HTML5 only issue... thanks... |
@geoffmcl sounds good, I've pushed a commit for review. |
@cqcallaw pulled your Hmmm, two separate tables... yeah, that's another way to go... switched on Built, and minimally tested, v.5.7.42.xcol1, and it works... so let's go for it... I did manage to run the regression, and two cases, 476a and 476b, popped on the diff, but it turns out one of the merges since Oct 3, 5.7.35, which is clean, and Nov 22, 5.7.42, caused the 2 duplicated warning message, and nothing to do with this extend color scheme... Note to self: Really MUST run the regression tests after EACH merge... just set But as stated, nothing to do with your commit... present the PR, and it will be merged, in due course... thanks... On a related topic, must also look at the 2 color tables in |
@cqcallaw found the duplicate warning, and fixed an out-of-order Now back to a full pass on the regression tests... and no assert on the DEBUG build ;=)) Bumped to 5.7.43 for these changes... hope you get the chance to rebase... thanks... |
Fair, the redundancy of color duplication is a bit lazy. I've removed that redundancy and tweaked the logic to accommodate that change. I've updated access.c as well. See https://github.com/cqcallaw/tidy-html5/tree/extended-colors Regarding automated regressions, perhaps GitHub Actions could help? See https://docs.github.com/en/free-pro-team@latest/actions/guides/about-continuous-integration |
@cqcallaw, wow, I did not mean to imply the small Have now built v.5.7.43.xcol2 and ran the regression tests, and all is fine... And thanks for extending the tables in These access tests are to try to point out things which may cause difficulty to some people with disabilities... see WAI/WCAG ... But this area of tidy has received very little support in recent years. We do have some regression tests for this, see In the past we have rejected CI... and I think that is still true for the main repo... Now, in this cases it is across two separate repos... yes, it may be possible to have a webhook, that fired on each push, to the main, to cause the regression tests repo, to pull and build the main repo, to get a current tidy binary, to be able to run the tests... But this is above and beyond my capability, or interest, and even if someone were to build it, implement it, and offered to maintain it, it may still be rejected... so for now it has to remain manual... I set up little bat files, like t-908.bat for this issue, and running it just takes 14 seconds... But this is probably not the place to discuss CI, or similar... for background see #175, #269, #330, #545, #546, and maybe others... Look forward to the final PR, closing this color issue... thanks... |
No worries, I think clean code is appropriate for a tool that's intended to encourage folks to write cleaner code. PR is submitted, and I've rebased the whitespace patch; I think that one is ready to submit as well. Thanks! |
HTML 4.01 only supports 16 color names, but HTML 5 supports a much larger set of named colors. Per the discussion in #903, it would be useful for tidy to support this extended set of colors.
The text was updated successfully, but these errors were encountered: