Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upIf both html attr and css property are existed, how to handle that? #1515
Comments
|
The spec describes how to do this. Specifically, http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#decohints describes how to map the type attribute to CSS presentational hints, and since the list-style-type property is inherited by default the list items pick up the lists's value unless they have another style set explicitly. |
|
Oh, and please don't bother reading the HTML 4 spec. It doesn't actually define much in the way of UA behavior, and much of what it does define doesn't match today's reality. You want to read the whatwg spec. |
|
@bzbarsky Thank you! ah.. This issue might be solved by aydinkim@0d8ee06 |
|
Sort of. UA stylesheet and presenatational hints have different specificity.... |
I am now working with html list - ul, ol, li element.
For example,
the correct output is
Ⅱ. DOM
C. IMAGE
but we cannot decide to apply the html attribute("A") or not because the css style value is alway set to specific values described in default user agent stylesheet like decimal or disc, not none.
In aspect of HTML attribute processing, it need to know whether corresponding css properties are set by user or not.
As quote of HTML 4.01 spec,
But to support backward compatibility, we need to implement the style&attr overlap case better or not.
Any idea for this?