Re: [csswg-drafts] [css-content] Description about <content-replacement> doesn't match what implementations do for pseudo-elements (#2657)

The note [here]( states:

> Note: Replaced elements use different layout rules than normal elements. (In effect, it becomes equivalent to an HTML &lt;img&gt; element.)

However the size of SVG can be different if I do this:


.container {
    width: 200px;
    height: 200px;
    border: 1px solid red;

#first::after {
    content: url(image.svg);

.container > img {
    display: block;
    width: 50px;
    height: 50px;


<div class="container" id="first">

<div class="container">
    <img src="image.svg">

when `image.svg` comes with `width` and `height`:

<svg width="100" height="100" viewBox="0 0 100 100" xmlns="">
  <circle cx="50" cy="50" r="50"/>

<img width="218" alt="image" src="">

GitHub Notification of comment by timdream
Please view or discuss this issue at using your GitHub account

Received on Tuesday, 8 October 2019 23:06:19 UTC