Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for style="column-count: 2;" #2892

Closed
reagle opened this issue Feb 4, 2021 · 5 comments
Closed

support for style="column-count: 2;" #2892

reagle opened this issue Feb 4, 2021 · 5 comments

Comments

@reagle
Copy link

reagle commented Feb 4, 2021

I only see a single column in the following slide:

<section id="ex.-quack-hunt" class="slide level2">
<h2>ex. Quack hunt</h2>
<p>Teams document an item that satisfies the most criteria for spotting a quack. (<a href="https://quackwatch.org/related/spotquack/">Barrett 2018</a>)</p>
<div style="font-size: 70%; column-count: 2;">
<ul>
<li>reveal only the benefits of their remedy.</li>
<li>claim to treat the “root cause” of your health problems.</li>
<li>promise quick, dramatic, miraculous results.</li>
<li>use disclaimers couched in pseudo-medical jargon.</li>
<li>use anecdotes and testimonials to support their claims.</li>
<li>display credentials not recognized by responsible scientists or educators.</li>
<li>diagnose their favorite diseases in virtually everyone who consults.</li>
<li>claim they are being persecuted by orthodox medicine and that their work is being suppressed because It’s controversial. …</li>
</ul>
</div>
</section>
@Martinomagnifico
Copy link
Collaborator

Just add the style to the UL, not the DIV. Case closed.

@Martinomagnifico
Copy link
Collaborator

Issue can be closed, see the fix above.

@reagle
Copy link
Author

reagle commented Jan 11, 2024

Hi @Martinomagnifico, these are slides generated by pandoc, with the markdown:

## `column-count: 2`

:::: {style="column-count: 2;"}
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
::::

It's not possible to apply the style to the UL. Also, is your suggestion of moving the style to UL an expediency or the way column-count is supposed to work? I don't think it's the latter because it works as I expect in contexts other than revealjs.

@Martinomagnifico
Copy link
Collaborator

Martinomagnifico commented Jan 11, 2024

It seems like the UL is displayed (as a whole) as inline-block, which then will not break across columns. In the theme CSS file there's this rule:

.reveal ul {
    display: inline-block;
}

You can override this with something like this: .reveal ul { display: block } in your theme CSS file.

@reagle
Copy link
Author

reagle commented Jan 11, 2024

@Martinomagnifico thanks! I'm able to get this to work with:

/* https://github.com/hakimel/reveal.js/issues/2892 */
div[style*="column-count"] ul, div[style*="column-count"] ol 
    {
        display: block
    }

I appreciate this hack but wonder why RevealJS sets ul,ol as inline-block and if it could cause me problems in the future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants