Observed while generating JavaScript bindings for AngleSharp's CSSOM in Jint (sebastienros/jint#3634), on the current AngleSharp.Css.
A colour value serializes as rgba(r, g, b, 1) for a fully opaque colour, where CSSOM's serialization of a <color> (https://drafts.csswg.org/cssom/#serialize-a-css-component-value, the rgb() / rgba() rule: "if the alpha is 1, serialize as rgb()") gives rgb(r, g, b). Scripts and tests that compare element.style.color against rgb(255, 0, 0) see the difference; browsers all serialize the opaque case as rgb(). Happy to send a PR if you would take one.
Observed while generating JavaScript bindings for AngleSharp's CSSOM in Jint (sebastienros/jint#3634), on the current AngleSharp.Css.
A colour value serializes as
rgba(r, g, b, 1)for a fully opaque colour, where CSSOM's serialization of a<color>(https://drafts.csswg.org/cssom/#serialize-a-css-component-value, thergb()/rgba()rule: "if the alpha is 1, serialize as rgb()") givesrgb(r, g, b). Scripts and tests that compareelement.style.coloragainstrgb(255, 0, 0)see the difference; browsers all serialize the opaque case asrgb(). Happy to send a PR if you would take one.