Reputation: 7589
The MDN definition of Palpable Content is as follows:
A content is palpable when it's neither empty nor hidden. Elements whose model is flow content or phrasing content should have at least one node which is palpable.
As per this definition Palpable Content is the one which can have at least one child node. So as far the MDN definitionn goes Flow Content elements has to at least have one child node. Now the hr
and br
elements are Flow Content bt they can't have palpable content.
I think MDN is really incorrect because the WHATWG official definition is:
As a general rule, elements whose content model allows any flow content or phrasing content should have at least one node in its contents that is palpable content and that does not have the hidden attribute specified.
MDN says any flow content element has to have palpabel content. WHATWG says The element(s) which can have flow has to have palpable content. This is the second time MDN s confusing and my faith over it has weakened like on w3school.
Also it is unclear from WHATWG definition what is palpable content. Is the one node, behaving as content, palpable content or is the element which allowed that content palpable? Suppose the following markup:
<p>
<br/>
</p>
p
element allows phrasing content and it has one node br
. Now is br
the palpable content or the p
?Upvotes: 2
Views: 458
Reputation: 1
is br the palpable content or the p?
The answer to that lies in the definition of what palpable content is, if an element's content model allows phrasing content or flow content then it should have at the very least one node in its contents that is not palpable and also baring in mind that it does not have hidden attribute specified. The br element's content model does not allow phrasing or flow content, which indicates that its not phrasing content.
Upvotes: 0
Reputation: 1273
MDN is incorrect, exactly as you say. Can you fix it? :-)
Now is
span
the palpable content or thep
?
Both are palpable content. Both allow phrasing content, so they should both have palpable content. This is fulfilled for the p
, but not for the span
.
Upvotes: 1