Skip to content

Ability to add body class with data-state #434

@marcysutton

Description

@marcysutton

Some background image techniques are just easier when you can apply them to the body, like image border backgrounds. I can apply a bottom border with background-position: center bottom; background-size: contain; if it's on the body, otherwise I have to calculate the height of a slide element element and position it with pixels; either super error prone, or unnecessarily complex scripting when I just need to focus on slide content.

I wrote some custom CSS to add a default body background for all slides, but even with bgColor set on each slide it flashes the image when I change slides, which is distracting in a presentation. In reveal.js, you can use data-state to add a CSS higher up in the DOM tree than you have access to from a slide. It would be killer to have something similar so you can override CSS per slide in highly specific ways.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions