hakimel / reveal.js

The HTML Presentation Framework
https://revealjs.com
MIT License
67.77k stars 16.64k forks source link

examples of css grid themes? #2393

Open titaniumbones opened 5 years ago

titaniumbones commented 5 years ago

I would love to see examples of themes that use CSS Grid to manage layout of slide content. Often I have side-by-side content or other more complex layouts that I want to be able to control directly; I have managed this with floats in the past but would much prefer a 2d grid instead. I would really love to follow someone else's example, though, as some of my past attempts have been retty messed up :-)

Thanks for any hints!

jakupmichaelsen commented 5 years ago

I second that!

And it would be awesome if the default themes all had a simple way of creating grids.

titaniumbones commented 5 years ago

I came up with a solution of my own that involves creating <section class="slideblock>elements and then applying one of several layout-imposing grid formats to the slide (which is a direct parent of thesection.slideblock`). Code, which modifies an older version of the solarized theme, is online here.

It's all pretty ad-hoc and it would be nice to implement some standard layouts that could be then supported by any theme authors who are interested. It could probably be implemented as a SASS partial to make it easier to standardize.