Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-lists-3][css-counter-styles-3] Request a way for list markers & counters to use "order-modified document order" #3895

Closed
jonjohnjohnson opened this issue May 6, 2019 · 2 comments

Comments

@jonjohnjohnson
Copy link

https://drafts.csswg.org/css-lists-3/
https://drafts.csswg.org/css-counter-styles-3/

Recently came upon a case where in a flex container I'm using order to manipulate an order-modified-document-order but then markers/counters are rendered useless since they use the document source order.

How about a property that can be set on the parent of the list items which calculates the "list order"? Maybe something like a list-order: modified?

@AmeliaBR
Copy link
Contributor

AmeliaBR commented May 6, 2019

order is only supposed to be used for layout, not for "sorting" or anything that changes the intended reading order of content:

Authors must use order only for visual, not logical, reordering of content. Style sheets that use order to perform logical reordering are non-conforming.

If you want a solution to make it easier to re-order a list in a way that actually re-orders it from a (possibly flattened) DOM perspective, you need to take it up with HTML/DOM. E.g., see whatwg/dom#586 for one proposal.

@jonjohnjohnson
Copy link
Author

Can't say I completely agree for all cases, but I do understand the motivations.

The problem with this is that the re-ordering isn't reflected in the accessibility tree or in the navigation order: CSS deliberately forbids this, since the point of this property was to create a divergence between the visual positioning and logical ordering of the elements.* Our continued position is that semantic ordering belongs in the source. - @fantasai - whatwg/dom#586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants