-
Notifications
You must be signed in to change notification settings - Fork 22.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
margin-left don't applies to ::first-line #31806
Comments
Same with margin-right |
The following properties apply to the ::first-line pseudo-element: font properties We need to change the applies to section. Source: https://www.w3schools.com/css/css_pseudo_elements.asp |
Indeed; the behavior can be confusing, too, because The content of Formal Definition sections is auto-generated from data in the "alsoAppliesTo": [
"::first-letter",
"::first-line"
], That should just be: "alsoAppliesTo": [
"::first-letter"
], I'll correct the |
I wonder why though, the spec for
...and the spec for
So is this nonstandard? (though it seems like Firefox, Chrome, and Safari all don't support it) |
@wbamberg Fair question! I think the definition of
|
(Or, well, not overriding, but what's implemented at the moment. [CSS-PSEUDO-4] perhaps isn't implemented in the browsers yet?) |
CanIUse entry for |
<!-- 🙌 Thanks for contributing! Adding details below will help us to merge your PR faster. --> <!-- Commits need to adhere to conventional commits and only `fix:` and `feat:` commits are added to the release notes. --> <!-- https://www.conventionalcommits.org/en/v1.0.0/#examples --> ### Description Correct the `alsoAppliesTo` for the CSS `margin` and `margin-{top,bottom,left,right.trim}` properties. ### Motivation The data claims that `margin*` properties apply to the `::first-line` pseudoelement, which is untrue. They apply to `::first-letter`, but not `::first-line`. As reported by @Akindin in mdn/content#31806. ### Additional details <!-- 🔗 Link to documentation, bug trackers, source control, or other places providing more context --> ### Related issues and pull requests Fixes mdn/content#31806
MDN URL
https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left
What specific section or headline is this issue about?
Formal Definition applies to
What information was incorrect, unhelpful, or incomplete?
margin-left doesn't work on ::first-line pseudoelement
What did you expect to see?
first line of text to have indentation
Do you have any supporting links, references, or citations?
https://codepen.io/Akindin/pen/MWxmqVg
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/css/margin-left
The text was updated successfully, but these errors were encountered: