javalent / fantasy-statblocks

Create Dungeons and Dragons style statblocks for Obsidian.md
MIT License
341 stars 71 forks source link

Triple-dot setting button not positioned correctly in Reading View #364

Closed sailKiteV closed 4 months ago

sailKiteV commented 4 months ago

Check for existing bug reports before submitting. #

There was a related issue, the solution to which may have accidentally contributed to the behaviour described in this issue: #102

Expected Behaviour #

The triple-dot setting button will be positioned within the overall statblock container, such as: statblock bug 1-1

Current behaviour #

The triple-dot setting button is positioned relative to the note container or other intervening ancestors with the appropriate position value: statblock bug 1-2

Reproduction #

  1. Launch Obsidian Sandbox via command Open sandbox vault.
  2. Turn off Restricted mode if require in Settings -> Core plugins.
  3. Install Fantasy Statblocks from the plugin store.
  4. Enable Fantasy Statblocks in Settings -> Core plugins.
  5. Create a new note via preferred method.
  6. Write a statblock codeblock into the note, such as
    ~~~statblock
    creature: Adult Black Dragon
    ~~~
  7. View the note in Reading View.

Which Operating Systems are you using? #

Obsidian Version Check #

1.5.8 and 1.5.8

Plugin Version #

4.0.9

Confirmation #

Possible solution #

The following CSS is one possible solution to the problem, and was used to produce the image in the Expected Behaviour section:

/* may be worth using .block-language-statblock instead */
.statblock-plugin-parent {
    position: relative;
}
.statblock-plugin-parent .icons:has(> .setting-editor-extra-setting-button) {
    left: var(--size-2-2);
}
valentine195 commented 4 months ago

I think I intentionally put it over there, but I can't recall the exact reason lol

I agree that it looks better closer. I'll try to roll this in with the next update, unless you're willing to PR :)