naturalcrit / homebrewery

Create authentic looking D&D homebrews using only markdown
https://homebrewery.naturalcrit.com
MIT License
1.07k stars 326 forks source link

Update table of content list-item breakage rules for wide table of contents #3516

Closed dbolack-ab closed 1 month ago

dbolack-ab commented 3 months ago

Simple CSS fix as noted in Issue to disable normal list break-avoidance.

Solves #2563

5e-Cleric commented 3 months ago

Wait, isn't this to make ToC auto cut in columns?

image

I see no change in lists or table of contents, am i doing something wrong?

G-Ambatte commented 3 months ago

Using this reproduction text:

{{toc,wide
# Contents

- ### [{{ Test 1}}{{ 2}}](#p2)
  - #### [{{ Test A}}{{ 2}}](#p2)
  - #### [{{ Test B}}{{ 2}}](#p2)
  - #### [{{ Test C}}{{ 2}}](#p2)
  - #### [{{ Test D}}{{ 2}}](#p2)
  - #### [{{ Test E}}{{ 2}}](#p2)
  - #### [{{ Test F}}{{ 2}}](#p2)
  - #### [{{ Test G}}{{ 2}}](#p2)
  - #### [{{ Test H}}{{ 2}}](#p2)
  - #### [{{ Test I}}{{ 2}}](#p2)
  - #### [{{ Test J}}{{ 2}}](#p2)
  - #### [{{ Test K}}{{ 2}}](#p2)
  - #### [{{ Test L}}{{ 2}}](#p2)
  - #### [{{ Test M}}{{ 2}}](#p2)
  - #### [{{ Test N}}{{ 2}}](#p2)
  - #### [{{ Test O}}{{ 2}}](#p2)
  - #### [{{ Test P}}{{ 2}}](#p2)
  - #### [{{ Test Q}}{{ 2}}](#p2)
  - #### [{{ Test R}}{{ 2}}](#p2)
  - #### [{{ Test S}}{{ 2}}](#p2)
  - #### [{{ Test T}}{{ 2}}](#p2)
  - #### [{{ Test U}}{{ 2}}](#p2)
  - #### [{{ Test V}}{{ 2}}](#p2)
  - #### [{{ Test W}}{{ 2}}](#p2)
  - #### [{{ Test X}}{{ 2}}](#p2)
  - #### [{{ Test Y}}{{ 2}}](#p2)
  - #### [{{ Test Z}}{{ 2}}](#p2)
}}

\page

# Test 1

## Test A

## Test B

## Test C

## Test D

## Test E

## Test F

## Test G

## Test H

## Test I

## Test J

## Test K

## Test L

## Test M

## Test N

## Test O

## Test P

## Test Q

## Test R

## Test S

## Test T

## Test U

## Test V

## Test W

## Test X

## Test Y

## Test Z

Production: image

Deployment: image

5e-Cleric commented 3 months ago

ah, i see, even columns, not column breaking on page end, alright then.

5e-Cleric commented 3 months ago

It is a fine fix, but i am concerned it may broke brews, imagine if someone has this setup in their brew:

image

With the new changes, their document becomes:

image

Granted, a column break correctly placed fixes this, users may not see it that obvious.

dbolack-ab commented 3 months ago

Granted, a column break correctly placed fixes this, users may not see it that obvious.

We could make this a V4 thing if there's plans for a V4 demarcation in the near future?

calculuschild commented 1 month ago

Another possible breaking case also if users are only making single-column TOCs and filling up the right side with artwork.

Before

image

After

image

That said, I'm leaning towards this being a very rare instance of breaking, and the fix is adding a single line.

What's the vote here? Merge or just leave for V4?

5e-Cleric commented 1 month ago

I'd merge, what do you guys think?

dbolack-ab commented 1 month ago

Seems like the correct fix for that single column case would be to create a tocSingle class that is designed for this situation, with alternating left/right based on page number or a tocSingleLeft and tocSingleRight for more explicit declaration.

calculuschild commented 1 month ago

Well, you would just take out the wide to make it single column.

calculuschild commented 1 month ago

Mmmmmk fellas. Gonna just merge this. If people get mad tell them its my fault.