Skip to content

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

Open
elooly10 wants to merge 5 commits into
mdn:mainfrom
elooly10:patch-1
Open

Changes example in CSS invert() to use appropriate classes.#43581
elooly10 wants to merge 5 commits into
mdn: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

github-actions Bot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Preview URLs (1 page)

(comment last updated: 2026-08-30 03:25:44)

@chrisdavidmills chrisdavidmills left a comment

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.

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.

@Josh-Cena
Josh-Cena requested a review from a team as a code owner August 30, 2026 03:15
@Josh-Cena
Josh-Cena requested review from estelle and removed request for a team August 30, 2026 03:15
@github-actions github-actions Bot added size/xs [PR only] 0-5 LoC changed and removed size/s [PR only] 6-50 LoC changed labels Aug 30, 2026
@Josh-Cena

Copy link
Copy Markdown
Member

@chrisdavidmills There's something obviously non-sensical about this example because the svgFilter class isn't even used. In fact, all these CSS filter-function pages are written so inconsistently I don't even know what the intended approach is: SVG inlined in the table, or as a separate markup. I suggest we pick a "canonical page structure" for all these pages (such as hue-rotate()) and then update all other pages.

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/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants