[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding a class to the auto-inserted <br> elements
From: |
Ihor Radchenko |
Subject: |
Re: Adding a class to the auto-inserted <br> elements |
Date: |
Sun, 01 Sep 2024 16:31:38 +0000 |
Daniel Radetsky <dradetsky@gmail.com> writes:
> So I was exporting an Org doc to html the other day, and I was trying to
> follow this guide to make the list elements appear as a comma-separated list
>
> https://markheath.net/post/css-comma-separated-list
>
> It didn't work, and I discovered this was because Org adds a <br> element
> to the <li> element if the <li> element is created from an Org headline
> element.
But there is nothing wrong on Org side per se, right? The fact that some
specific suggestion from the internet did not work for a specific
HTML that happened to be created by Org mode, does not mean that we need
to fix Org mode. Unless the change you suggest may benefit many Org
users, of course.
> ... The easiest way to fix this and allow the aforementioned guide to
> work is by ensuring that all those <br> elements have `display: none` set
> via CSS. To make this easier and/or reduce the risk of accidentally
> removing other elements, we can add a class name to those <br>'s the way we
> do to other elements.
What would be the benefit of doing this beyond fixing your personal use case?
For other Org users.
Also, you can always use p > a CSS selector. What's wrong with that?
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: Adding a class to the auto-inserted <br> elements,
Ihor Radchenko <=