Visit Mozilla.org

CSS::-moz-only-whitespace

From MDC

« CSS Reference

[edit] Summary

The :-moz-only-whitespace pseudo-class matches an element that has no child nodes at all or empty text nodes or text nodes that have only white-space in them. Only when there are element nodes or text nodes with one or more characters inside the element, the element doesn't match this pseudo-class anymore.

[edit] Syntax

span:-moz-only-whitespace { style properties }

[edit] Examples

span:-moz-only-whitespace::before
{
    background-color: lime;
}

...where...

  <span> </span>

[edit] Notes