hide-if-shadow-contains
The hide-if-shadow-contains
snippet hides any HTML element (or one of its ancestors) that matches a CSS selector if the text content of the element's shadow contains a given string.
You can use the hide-if-shadow-contains
snippet to hide an element based on its shadow's text.
Parameters
Name | Description | Mandatory |
---|---|---|
search | The string to look for in every HTML element's shadow. If the string begins and ends with a slash (/), the text in between is treated as a regular expression. | Yes |
selector | The CSS selector that an HTML element must match for it to be hidden. | Yes |
Filter examples
The following table lists examples that use the hide-if-shadow-contains
snippet:
Filter | Result |
---|---|
| Hides any |
| Hides any |
Other resources
Last updated