forgejo-federation/web_src/css
silverwind dcde4701a5
Fix math and mermaid rendering bugs (#24049)
1. Fix multiple error display for math and mermaid:


![err](https://user-images.githubusercontent.com/115237/231126411-8a21a777-cd53-4b7e-ac67-5332623106e8.gif)

2. Fix height calculation of certain mermaid diagrams by reading the
iframe inner height from it's document instead of parsing it from SVG:

Before:
<img width="866" alt="Screenshot 2023-04-11 at 11 56 27"
src="https://user-images.githubusercontent.com/115237/231126480-b194e02b-ea8c-4ddf-8c79-50c525815d92.png">

After:
<img width="855" alt="Screenshot 2023-04-11 at 11 56 35"
src="https://user-images.githubusercontent.com/115237/231126494-5fe86a48-8d21-455a-8b95-79b6ee27a16f.png">

3. Refactor error handling to a common function
4. Rename to `renderAsciicast` for consistency
5. Improve mermaid loading sequence

Note: I did try `securityLevel: 'sandbox'` to make mermaid output a
iframe directly, but that showed a bug in mermaid where the iframe style
height was set incorrectly. Opened
https://github.com/mermaid-js/mermaid/issues/4289 for this.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
2023-04-17 12:10:22 +02:00
..
chroma Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
code Fix some broken css (#23560) 2023-03-18 17:53:12 -04:00
codemirror Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
console Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
features Set opaque background on markup and images (#23578) 2023-03-21 17:38:04 -04:00
markup Fix math and mermaid rendering bugs (#24049) 2023-04-17 12:10:22 +02:00
modules Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
shared Convert issue list checkboxes to native (#23596) 2023-03-30 11:02:47 -04:00
standalone Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
themes CSS color tweaks (#23828) 2023-03-31 16:24:47 +08:00
admin.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
animations.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
base.css Fix math and mermaid rendering bugs (#24049) 2023-04-17 12:10:22 +02:00
dashboard.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
editor-markdown.css Set EasyMDE heading font-size to the same size as the resulting markdown (#24151) 2023-04-16 20:01:08 +08:00
editor.css Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 2023-04-03 18:06:57 +08:00
explore.css Fix long name ui issues and label ui issue (#23541) 2023-03-18 17:07:59 +01:00
font_i18n.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
form.css Replace tribute with text-expander-element for textarea (#23985) 2023-04-09 12:18:45 -04:00
helpers.css Fix math and mermaid rendering bugs (#24049) 2023-04-17 12:10:22 +02:00
home.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
index.css Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 2023-04-03 18:06:57 +08:00
install.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
organization.css Org pages style fixes (#23901) 2023-04-04 06:49:09 +02:00
package.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
repository.css Adjust sticky pr header to cover background (#23956) 2023-04-08 20:43:15 +08:00
review.css Expand/Collapse all changed files (#23639) 2023-04-09 21:11:02 +08:00
runner.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
svg.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
tribute.css Replace Less with CSS (#23481) 2023-03-14 22:20:19 -04:00
user.css Fix user profile description rendering (#23882) 2023-04-03 16:11:16 -04:00