Skip to content

Commit

Permalink
fix(markdown-parser): do not apply margin for first child/heading
Browse files Browse the repository at this point in the history
and revert margin/padding changes in html

note: commit overwrites gn-ui css for now. can be removed on next gn-ui update where the bug has been fixed as well
  • Loading branch information
tkohr committed Sep 9, 2024
1 parent 0ca1411 commit 0dafd12
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h2 class="mel-section-title mb-6" translate>mel.dataset.abstract</h2>
[showContent]="fieldReady('abstract')"
>
<mel-datahub-text-expand [maxLines]="3"
><div class="sm:block text-2xl pb-8">
><div class="sm:block text-2xl">
<gn-ui-markdown-parser
[textContent]="record.abstract"
></gn-ui-markdown-parser></div
Expand Down
2 changes: 1 addition & 1 deletion libs/mel/src/lib/text-expand/text-expand.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div
#container
class="overflow-hidden transition-[max-height] duration-300 relative"
class="overflow-hidden transition-[max-height] duration-300 mb-8 relative"
[ngClass]="isExpanded || !showToggleButton ? 'ease-in' : 'ease-out'"
[style.maxHeight]="maxHeight"
>
Expand Down
6 changes: 6 additions & 0 deletions resources/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,9 @@ gn-ui-copy-text-button div button {
gn-ui-copy-text-button div textarea {
@apply bg-white rounded-l !important;
}

/** No margin for first markdown child/heading, that cannot be detected by getBoundingClientRect()
=> can be removed after next gn-ui update **/
.markdown-body :first-child {
margin-top: 0 !important;
}

0 comments on commit 0dafd12

Please sign in to comment.