Re: [csswg-drafts] [css-content] Generation of bookmarks from CSS is not defined

> Is the tree to be produced in the order that the content appears in 
the HTML? The order of definitions in the CSS? Other? 

 The tree should appear in document order. 

> What about if there are "sub-documents" with CSS references - for 
example, embedded SVG or even HTML in an iFrame?

At least one implementation just ignores iframes. I don't currently 
have a use case for including bookmarks from external documents. 

> What about the level - is that relative the previous item (and if 
so, in what order)? What if you find a 2 before a 1, what is the 
expected behavior?

I don't think it should be relative to previous items. The document 
author controls bookmark level via CSS, but user agents choose to how 
to expose and display the bookmarks to users. For the purposes of the 
spec, level really only matters for determining which bookmarks are 
hidden when a bookmark is set to closed.

So if the first bookmark in a document has level 2, it is just 
displayed as a bookmark. It will never be closed, as there won't be a 
nearby previous element with lower bookmark level. 

I'll work on adding spec prose.



-- 
GitHub Notification of comment by dauwhe
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/204#issuecomment-227829575 
using your GitHub account

Received on Wednesday, 22 June 2016 18:10:09 UTC