w3c / w3c/csswg-drafts

[css-content] Implementations and spec disagree regarding content: url on elements

Open
#2,889 11 comments 0 reactions 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

Per spec, we're supposed to wrap the content in a box, and thus this:

<!doctype html>
<style>
div {
  content: url(..);
  border: 2px solid blue;
}
</style>
<div></div>

Is supposed to render a border on a block box, and the image as a replaced inline inside. Instead implementations replace the whole <div> with a replaced box.

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 with the HTML/CSS testcase in the issue and compare its rendering with the relevant specification text for content: url on elements. Investigate how implementations handle the div's border and replaced content; done means the specification and implementation behavior are reconciled and the resolution is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.