Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [1.9.0-2b]: Admonitions (callouts) strange behavior #521

Open
Chupakabra0 opened this issue Sep 28, 2024 · 4 comments
Open

[Bug] [1.9.0-2b]: Admonitions (callouts) strange behavior #521

Chupakabra0 opened this issue Sep 28, 2024 · 4 comments
Labels
bug Something isn't working has-link This issue provides a link (possibly to a resource helpful to reproduce the issue)

Comments

@Chupakabra0
Copy link

What happened?

  1. Admonitions from plugin https://github.com/javalent/admonitions and callouts not support collapsibility (worked before)
  2. Admonitions and callouts doesn't support custom .css snippets like this: https://github.com/r-u-s-h-i-k-e-s-h/Obsidian-CSS-Snippets/blob/Collection/Snippets/Callout%20styling%20-%20Old%20callouts.md (worked before).

Reproduction

Just create note with admonition or callout (syntax style doesn't matter) and try to export it via any option to .html

Last Working Version

1.8.1-2b

Version

1.9.0-2b

Operating System

Windows 11 Pro 23H2

Obsidian Version

1.6.7 both

Which browsers can you reproduce this in?

Firefox, Microsoft Edge

Relevant log output

N/A

Additional Info

I don't have additional info about collapse, I don't strong enough in web stuff, but about snippets I have an idea: it seems to me plugin's style of .callout-content overrides my snippet's style, 'cause I able to remove background-color and padding via developer tools in Firefox and my snippet become working.

not working image
working image

Temporary solution: rollback to 1.8.1-2b where snippets and collapse work as intended.

@Chupakabra0 Chupakabra0 added the bug Something isn't working label Sep 28, 2024
@github-actions github-actions bot added the has-link This issue provides a link (possibly to a resource helpful to reproduce the issue) label Sep 28, 2024
@github-actions github-actions bot changed the title [Bug]: Admonitions (callouts) strange behavior [Bug] [1.9.0-2b]: Admonitions (callouts) strange behavior Sep 28, 2024
@KosmosisDire
Copy link
Owner

I'll check this out and try to make sure it works in the next release. Thanks!

@Chupakabra0
Copy link
Author

1.9.0-3b update fixed callouts collapsability for me. But again, custom .css snippets doesn't work.

Used .css snippet:

body {
    --callout-border-width: 0 0 0 4px;
    --callout-border-opacity: 1;
    --callout-radius: 0;
    --callout-padding: 0;
    --callout-title-padding: var(--size-4-4) var(--size-4-4);
    --callout-content-padding: var(--size-4-2) var(--size-4-4);
}

.admonition-bug, .admonition-note, .admonition-abstract .admonition-info
.admonition-tip, .admonition-success, .admonition-question, .admonition-warning,
.admonition-failure, .admonition-danger, .admonition-bug, .admonition-example,
.admonition-quote {
    page-break-inside: avoid !important;
}

.admonition-title-content .admonition-title-content {
    padding-left: 3px;
}

.admonition, .callout {
    page-break-inside: avoid !important;
}

.admonition-title-inner, .callout-title-inner {
    padding-left: 3px;
    color: var(--text-normal);
}

.admonition-content, .callout-content {
    background-color: var(--background-primary-alt);
    padding: 20px;
}

.admonition-title-icon, .svg-inline--fa {
    width: 18px;
    height: 18px;
}

div #webpage-icon {
    width: 0px;
    height: 0px;
}

@Chupakabra0
Copy link
Author

Found "custom html/js feature". Inserting my .css content to style of .html file resolved my issue. It would be more convenient if I could use css without html-wrapper. But I'm personally ok with it 😅

@KosmosisDire
Copy link
Owner

Ah yes you have to wrap it in style tags, because it is an HTML file which just gets inserted into the page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has-link This issue provides a link (possibly to a resource helpful to reproduce the issue)
Projects
Development

No branches or pull requests

2 participants