Classes are stripped out

Created on 1 September 2021, about 3 years ago
Updated 27 December 2023, 11 months ago

Problem/Motivation

Some classes present on edit are stripped out when viewing node.

Steps to reproduce

Add a cover block and upload a dark background. An .is-dark-theme class is automatically added to the element, which controls the text color (e.g. white text on dark background). However, this class is stripped out when the node is saved and viewed, causing the text to become dark.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇫🇮Finland iamfredrik

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇴Norway eiriksm Norway

    Would be nice to have an example image triggering the error uploaded to the issue though

  • 🇫🇮Finland iamfredrik

    Please view the screenshots of the cover block element before and after saving the node. Notice how the `is-dark-theme` class is missing from the saved output.

  • 🇳🇴Norway eiriksm Norway

    Great!

    I was actually more thinking of an actual image to upload that would trigger the error 🤓

  • 🇫🇮Finland iamfredrik

    You don't need an image. Just select black or any dark color as background.

  • 🇳🇴Norway eiriksm Norway

    Aha!

    I was reading this: "upload a dark background" and assumed that meant uploading an image that was dark to use as background 🤓

    Thanks for the clarification!

  • 🇫🇮Finland iamfredrik

    Sorry for the confusion. This issue was created in 2021 so I don't have the actual image used back then, but I'd say any dark background image should trigger the same issue. I tested it now using the color selections and it still triggered the issue.

Production build 0.71.5 2024