dotcom-rendering icon indicating copy to clipboard operation
dotcom-rendering copied to clipboard

Interactive atoms: consider a simple colour filter for DCAR darkmode

Open sophie-macmillan opened this issue 2 years ago • 0 comments

There are some cases in DCAR where we are passed content which we are not in control of. Some examples include

  • Interactive atom
  • Chart atom

Currently - we are forcing these to always be in light mode. However @mxdvl suggested we could use a filter in order to render these in dark mode (see screenshots)

Note: This may be risky though, if there are images in the interactive atom it might look weird inverted.

We should talk to the Interactive content creators to see if this is an acceptable solution.

iframe[interactive] {
  filter: hue-rotate(180deg) invert();
}

Codepen example Image

sophie-macmillan avatar Nov 23 '23 16:11 sophie-macmillan