There is no error in the implementation of the spec; as long as the computed value is not none
, a shadow will be generated. The only possibilities for values computing to none
are either none
or initial
.
Text shadows behave similarly to box shadows, following the specifications outlined for box shadows. Nowhere does it state that a shadow should not be created with all zeros. The specs simply outline two possible values: none
or a set of comma-separated <shadow>
value groups, defined as
[ <length>{2,3} && <color>? ]#
in
its own specification. As long as a non-zero value is provided, a shadow will be drawn according to the specs.
Both text and box shadows default to using currentColor
for color if none is specified. This ensures consistency in rendering.
The appearance of layers of semi-transparent pixels creating unusual effects with zero-length shadows is likely due to anti-aliasing during rendering, impacting both text and box shadows. Browsers exhibit this behavior consistently across various scenarios.
To work around issues with none
values, you can specify transparent
for the color. This will result in an invisible shadow being drawn, effectively hiding it from view.