::before and ::after pseudo-elements
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 56
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
I’ve noticed that Chrome does not render the ::before and ::after pseudo-elements. The spec doesn’t appear to specify whether they should or shouldn’t be supported. I would expect that most CSS features would be supported unless explicitly specified not to.
My use case was trying to implement something like the old <menclose notation="downdiagonalstrike"> with CSS:
<mrow class="cancel">
<mn>1</mn><mo>+</mo><mn>1</mn>
</mrow>
.cancel {
position: relative;
}
.cancel::after {
background: linear-gradient(
to bottom right,
transparent calc(50% - 0.1ex),
currentColor calc(50% - 0.05ex),
currentColor calc(50% + 0.05ex),
transparent calc(50% + 0.1ex)
);
content: "";
inset: 0;
position: absolute;
}
I could off course just add the background to the original element, but if the line is a different color than the content, then the line is drawn behind the content.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the issue discussion and the linked HTML and CSS examples, focusing on whether ::before and ::after should be supported for the shown MathML structure. Done means the specification clearly resolves the support question and records the expected behavior for this use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, html
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100