{"id":195116,"date":"2015-02-04T14:37:38","date_gmt":"2015-02-04T21:37:38","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=195116"},"modified":"2015-03-26T15:28:22","modified_gmt":"2015-03-26T22:28:22","slug":"blank","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/selectors\/b\/blank\/","title":{"rendered":":blank"},"content":{"rendered":"
The And it will also select these paragraphs, which At the time of this writing, See the Pen :blank and :-moz-only-whitespace<\/a> by mariemosley (@mariemosley<\/a>) on CodePen<\/a>.<\/p>\n The :blank pseudo-class builds upon the :empty pseudo-class. Like :empty, :blank will select elements that contain nothing at all, or […]<\/p>\n","protected":false},"author":33562,"featured_media":0,"parent":14154,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"page-almanac-single.php","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":"","_share_on_mastodon":"0","_share_on_mastodon_status":"%title% %permalink%"},"tags":[],"acf":[],"share_on_mastodon":{"url":"","error":""},"jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/195116"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/33562"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=195116"}],"version-history":[{"count":12,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/195116\/revisions"}],"predecessor-version":[{"id":199070,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/195116\/revisions\/199070"}],"up":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/14154"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=195116"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=195116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}:blank<\/code> pseudo-class builds upon the
:empty<\/a><\/code> pseudo-class. Like
:empty<\/code>,
:blank<\/code> will select elements that contain nothing at all, or contain only an HTML comment. But,
:blank<\/code> will also select elements that include whitespace, which
:empty<\/code> will not.<\/p>\n
p:blank {\r\n display: none;\r\n}<\/code><\/pre>\n
p:blank<\/code> will select these paragraphs, just like
p:empty<\/code> would:<\/p>\n
<p><\/p>\r\n<p><!-- nothing but a comment--><\/p><\/code><\/pre>\n
p:empty<\/code> would not:<\/p>\n
<p> <\/p>\r\n<p>\r\n\r\n <!--a comment and some whitespace-->\r\n \r\n<\/p><\/code><\/pre>\n
:blank<\/code> is part of the CSS Selectors Level 4 draft, and is not supported by any browser. Mozilla supports its own version of
:blank<\/code> under a different, vendor-prefixed name:
:-moz-only-whitespace<\/a><\/code>. The demo below includes Mozilla’s version, and will only work in Mozilla browsers for now.<\/p>\n
Related<\/h3>\n
\n
More Information<\/h3>\n
\n
Browser Support<\/h3>\n
\n\n
\n Chrome<\/span><\/th>\n Safari<\/span><\/th>\n Firefox<\/span><\/th>\n Opera<\/span><\/th>\n IE<\/span><\/th>\n Android<\/span><\/th>\n iOS<\/span><\/th>\n<\/tr>\n<\/thead>\n\n \n Nope<\/td>\n Nope<\/td>\n As :-moz-only-whitespace<\/td>\n Nope<\/td>\n Nope<\/td>\n Nope<\/td>\n Nope<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"