Skip to content

Offers some improvements in styles for obsidian admonition plugin.

License

Notifications You must be signed in to change notification settings

LeCheenaX/Obsidian-admonition-improvement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Obsidian-admonition-improvement

Offers some improvements in styles for obsidian admonition plugin.

Issues in the default admonition style

Inaccordance behavior of line-breaks under different mode

In reading view, the callout may behave like this:

image

However, when you switch to edit view:

image

The line-breaks at the beginning is wrapped, while the line-breaks at the bottom is increased significantly.

Inaccordance of margins

To clarify, I will use "border" style in "Blue_Topaz" theme. This style is clearer to show the issue.

image

As is clearly shown above, the left/right margin is about 8px, while the top/bottom margin is 16px.

I believe 8px for left margin looks good, and as right margin is not defined (automatically suits text), the top/bottom margin makes the paragraph look very uncomfortable.

Child callouts issue

In a very complicated case(just to show the issue), the spaces between child-callout and child-callout, between paragraph and child-callout seem very awful. The space is not coordinated. image

Moreover, consider writing the following paragraph in a child callout in source view:

wohoo

wohoo
wohoo

In reading view, it seems fine as above screenshot shows.

However, in live-preview, the line break is omitted (bug). image

The workaround

The css snippets fixes the above issue by:

1.making the callout contents exactly the same in reading view and live-preview, no inaccordance issue

2.if deem contents in a callout as a whole:

2.1 setting the margin of this whole to the same value

2.2 preserving the margin of sub-contents in this whole

3.making child callouts behave the same like normal callout, but more clean and organized

4.optimizing margin of paragraph with bullet list and number list

Now the previous complicated case looks very fine: image

More examples

Before:

image

After:

image


Before:

image

After:

image


Before:

image

After:

image

About

Offers some improvements in styles for obsidian admonition plugin.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages