- From: Martin Robinson via GitHub <noreply@w3.org>
- Date: Fri, 03 Apr 2026 11:33:15 +0000
- To: public-css-archive@w3.org
mrobinson has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-pseudo] Possible interoperability issues with white-space handling in `::first-letter` ==
[First Letter and Associated Punctuation](https://drafts.csswg.org/css-pseudo/#first-letter-pattern) seems to imply that white-space that precedes the first letter pattern should be ignored. Yet, all major browser do include leading white space consistently though their some behaviors are incompatible:
```html
<!DOCTYPE html>
<style>
div {
float: left;
outline: solid 1px black;
margin-right: 10px;
}
div::first-letter {
font-size: 30px;
background: pink;
}
</style>
<div style="white-space: pre;">Hello</div>
<div style="white-space: pre;">H.ello</div>
<div style="white-space: pre;">.H.ello</div>
<div style="white-space: pre;"> .H.ello</div>
<div style="white-space: pre;"> Hello</div>
<div style="white-space: pre;"> . H .ello</div>
```
Firefox:
<img width="527" height="68" alt="Image" src="https://github.com/user-attachments/assets/d18aaf16-7131-4d0f-aec3-a3b04026515c" />
Chrome:
<img width="527" height="68" alt="Image" src="https://github.com/user-attachments/assets/9bdb7a8e-c09b-4dd3-9cbc-7f193509291f" />
Epiphany (WebKit):
<img width="521" height="59" alt="Image" src="https://github.com/user-attachments/assets/52cc5923-2734-4102-a059-02ad643c4f11" />
Servo (does not include white-space, in an attempt to implement the spec):
<img width="521" height="59" alt="Image" src="https://github.com/user-attachments/assets/b5d9b0ba-7899-48bb-89ea-6908834028a6" />
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13766 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 3 April 2026 11:33:16 UTC