THE GITHTML FIELD GUIDE
Find CSS mask dependencies that disappear offline
A CSS mask can load an external image even when the visible icon looks like a simple colored shape. If that resource is missing or disallowed, the masked result may disappear. Keep meaningful labels in HTML, inspect mask-image dependencies, and replace unnecessary masks with a dependable static representation for the reading copy.
Identify the hidden dependency
An icon can be drawn by coloring a box and masking it with an SVG file. Searching only img elements misses this dependency. A missing status symbol can then leave a row's meaning unclear.
Consider a comparison table where green check shapes and amber warning shapes are generated entirely through CSS masks. The HTML may contain empty spans, so losing the mask removes the only visible status distinction. Inventory those elements by meaning rather than merely counting resource URLs. Identify whether a neighboring text label already communicates the state. If not, add the label to the document before deciding how to preserve the decoration. A status should not become unknowable because an external SVG or a particular masking behavior is unavailable.
Prepare the intended reading copy
Inspect mask-image and related prefixed rules in the stylesheet. Decide whether the shape is decorative or carries information. For a labeled status, removing the ornament may be enough; for essential graphics, preserve a reviewed asset through a suitable content element.
For decorative masks, removing the icon and retaining clear text can be the simplest reading-copy treatment. For an information-bearing shape, choose a supported static asset or inline representation and verify its accessibility and resource needs. Do not assume that converting a background image to a mask eliminated the image dependency. Inspect both standard and prefixed declarations, including any multiple-mask composition that changes the result. Keep the original design intent documented so a later theme refresh does not reintroduce empty icon-only controls or status cells. Avoid adding scripts merely to recreate a decorative effect.
- Search stylesheet mask references as well as image tags.
- Separate decorative masked shapes from information-bearing graphics.
- Keep essential labels independent of mask availability and test the offline result.
<p><strong>Status:</strong> awaiting review</p>Verify the offline result
Disable the mask resource and confirm that the associated action or state still has an understandable label.
Review the page with mask resources unavailable and compare the resulting labels with the intended states. Check button names, table statuses, and legend entries separately. If the mask was used as part of a diagram rather than an ornament, verify that its replacement preserves the relevant shape and relationship. The acceptance criterion is that readers can identify the action or state without guessing from color, position, or a missing silhouette. A visually simpler copy can be more faithful to the information.
Sources and further reading
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.