Skip to content

Changes example in CSS invert() to use appropriate classes.#43581

Open
elooly10 wants to merge 4 commits intomdn:mainfrom
elooly10:patch-1
Open

Changes example in CSS invert() to use appropriate classes.#43581
elooly10 wants to merge 4 commits intomdn:mainfrom
elooly10:patch-1

Conversation

@elooly10
Copy link
Copy Markdown

Description

Applies the css invert to the item in the example labelled invert() filter instead of the SVG invert for the SVG filter equivalent, and fixes the SVG filter equivalent with a class as the document's text explains rather than as an inline SVG.

Motivation

The changes keep the content accurate and make the playground more useable.

…rt use the svg.

- The item labelled as css now uses the `invert` class
- The item labelled as SVG now uses the `svginvert` class that was previously used by the css item instead of a direct SVG, more in line with the explanation.
@elooly10 elooly10 requested a review from a team as a code owner March 26, 2026 02:25
@elooly10 elooly10 requested review from chrisdavidmills and removed request for a team March 26, 2026 02:25
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed labels Mar 26, 2026
Refactor HTML for image display in invert filter example.
…dex.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @elooly10. What you are proposing to fix makes sense, but you've gone too far and broken the SVG equivalent — see the comment below.

<td>
<img
class="svgFilter"
class="filter"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only change that is needed to make the fix that you've proposed. The other changes below have broken the SVG equivalent version — it no longer displays properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants