[css-anchor-position][css-page] Suggestion for predefined anchor constants and paged media specific non-element anchors
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
We think that Anchor Positioning could cover a use case we current have to provide a proprietary property for.
That use case is that in paged media it should be possible to position elements relative to the page.
To achieve that via anchors we propose two additions to the specification:
-
The concept of predefined anchor constants, which can be unrelated to elements.
The syntax could be an ident, without the two dashes, as it is explicitly CSS-defined not author-defined. However, we have no specific preference regarding this. -
Defining the following constants to refer to boxes of the first page that the absolutely-positioned element has boxes on:
- page-content
- page-padding
- page-border
- page-margin
- page-trim
- page-bleed
- page-media
When the UA has no concept of trim, bleed and media, those should fall back to margin.
For non-paged media these anchors could either be not found or fall back to the root element or the view port.
see
https://drafts.csswg.org/css-anchor-position-1/#determining
https://drafts.csswg.org/css-page-3/#page-model
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the determining section of css-anchor-position-1 and the page model in css-page-3 first. Evaluate how predefined anchor constants and the proposed page anchors would be specified, including the stated fallbacks, and confirm that the specification defines their behavior consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100