w3c / w3c/csswg-drafts

[css-content] content: contents will not be compatible.

Open
#4,632 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

css-content-3
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

I was fixing a Gecko compat issue (https://github.com/webcompat/web-bugs/issues/46914) which is present because we always serialize content: normal as content: none, even on elements.

I'm going to fix Gecko to follow the spec and getComputedStyle() returns none for pseudo-elements, but not for elements. But such code wouldn't work if we were to make content: normal compute to content: contents on elements either, which is what the latest draft specifies: https://drafts.csswg.org/css-content/#content-property

So I propose for content: normal to compute to itself for elements, and removing content: contents from the spec.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the CSS Content specification section on the content property and the linked Gecko compatibility report. Compare the draft's computed-value rules for elements and pseudo-elements with the proposed normal behavior. Done would require an agreed specification decision and the corresponding editor-draft update.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.