wiktoriavh/Spectrum

[BUG] "max-width: fit-content" produces full-width lines when displaying tasks with the "Obsidian Tasks" plugin

phil-holland opened this issue · 2 comments

Describe the bug
In reading mode, when rendering a task list with Obsidian Tasks, the corresponding div is stretched to the full width of the page. In live-preview editing mode, the width is correct.

After investigating the theme CSS file, it seems that removing the max-width: fit-content; line (originating in this scss file, I'm assuming?) fixes the issue (but I'm not sure if removing this would break something else).

I've also noticed that removing the min-width: 750px entry in the same CSS block stops rendered task blocks from stretching outside the width of the screen on small displays (i.e. on mobile). And also apparently fixes the same behaviour in metadata blocks - i.e. #29

To Reproduce
Steps to reproduce the behavior:

  1. Install the Obsidian Tasks plugin
  2. Create a new note with the contents:
### Task List

```tasks
not done
due after 2022-01-02
due before 2022-01-04
```

### Other Text

Consequat semper viverra nam libero justo laoreet. Sapien nec sagittis aliquam malesuada bibendum arcu vitae elementum curabitur. Venenatis lectus magna fringilla urna porttitor rhoncus. Tristique et egestas quis ipsum suspendisse ultrices gravida. Risus quis varius quam quisque id diam vel quam. Quis viverra nibh cras pulvinar mattis nunc. Aliquam vestibulum morbi blandit cursus risus at ultrices mi tempus. Quis hendrerit dolor magna eget est.

---

### Task Creation

- [ ] #task Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Tempor nec feugiat nisl pretium fusce id. 📅 2022-01-03

---
  1. Switch to reading mode

Expected behavior
The div should be limited to the same maximum width as all other elements in the note.

Screenshots

In live-preview editing mode:

image

In reading mode:

image

Desktop (please complete the following information):

  • OS: Windows 10
  • Obsidian Version: v0.13.14

Thank you for all the work on the theme - I'm a big fan!

I hope this will fix the issue you were having, and I'm glad you like the theme!

Yep, all looks good now, thanks!