Discussion request: CSS usage in WICG's Formatted Text proposal
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- css
- Domain
- web-dev
Research direction
Start with this issue, then read the linked WICG canvas-formatted-text explainer and explainer-datamodel.md, especially the supported CSS section. Review the earlier CSS Houdini issue and its discussion for context. Done would require a resolved CSS WG position on the proposed CSS usage, but the issue does not define a concrete implementation task.
Written by the indexing model from the issue text.
Description
Hi CSS WG!
An incubation experiment (canvas formatted text) is underway in WICG in which the thesis summary is: can we leverage the power of the CSS layout engine for text line formatting outside of the DOM to provide both 1) richer text formatting options for HTML Canvas rendering and 2) detailed line metrics? The solution aspires to integrate into other existing efforts like Houdini Layout API's treatment for inline boxes). A lot more background can be found in the incubation's explainer. Note, the CSS WG discussed an early version of this proposal last July in https://github.com/w3c/css-houdini-drafts/issues/990, topic: "String based inline layout API".
A primitive JavaScript data model for holding text includes a mechanism similar to DOM Nodes for supplying CSS properties/values through a StylePropertyMap.
At this point in the incubation effort, we would like to validate and discuss the chosen approach to CSS usage with the CSS WG.
Some questions we are thinking about:
- The proposed data model isn't specifically tied to HTML canvas. It doesn't necessarily need to follow typical Canvas conventions. We like leveraging the familiar CSS properties versus introducing a parallel set of new JS APIs that do basically the same thing.
- Only a subset of CSS would be supported (properties applicable to inline/text layout). Is there precedent for such a subset? What precedent might this be establishing for the future?
- We assumed
StylePropertyMapis the preferred entry point for modern CSS-OM/ Typed OM. Should legacy.styleobject access be included?
Whether CSS syntax is ultimately used as the styling input mechanism or not, the specification of line formatting behavior is expected to conform to existing CSS norms, and refer to algorithms and definitions in CSS language specifications.
Thanks!
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 24
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.
More from w3c/csswg-drafts
-
Agenda+ css-sizing-4 css-values-5
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
w3c/csswg-drafts#14502 · 1 reaction ·
-
css-values-5 editorial Needs Edits
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
w3c/csswg-drafts#14498 · 2 comments ·
-
css-overflow-4 topic: line-clamp
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
w3c/csswg-drafts#14485 · 1 comment ·
-
Administrative Tracker css-values-4
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
w3c/csswg-drafts#14482 · 4 comments · 1 reaction ·
-
css-values-5 Needs Edits
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
w3c/csswg-drafts#14466 ·
All issues in w3c/csswg-drafts
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
tvOS
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bvaughn/react-resizable-panels#751 · 1 comment ·
-
www.wiwo.de OpenN: AdGuard Browser Extension P3: Medium T: Annoyance
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
AdguardTeam/AdguardFilters#242026 ·
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 92/100