From 5505b3ce117fdebcf68dea1e13bb341795887ff1 Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Wed, 30 Mar 2022 09:40:48 +0200 Subject: [PATCH] Correct styling of syntax highlighter .section elements (#1984) Fixes styling of syntax highlighter .section elements which causes unsightly rendering due to a global definition by bulma. --- gradle/changelog/highlighter_styling.yaml | 2 + .../src/SyntaxHighlighterRenderer.tsx | 4 + .../src/__snapshots__/storyshots.test.ts.snap | 684 +++++++++--------- 3 files changed, 348 insertions(+), 342 deletions(-) create mode 100644 gradle/changelog/highlighter_styling.yaml diff --git a/gradle/changelog/highlighter_styling.yaml b/gradle/changelog/highlighter_styling.yaml new file mode 100644 index 0000000000..ab4b8df77a --- /dev/null +++ b/gradle/changelog/highlighter_styling.yaml @@ -0,0 +1,2 @@ +- type: fixed + description: Correct styling of syntax highlighter .section elements ([#1984](https://github.com/scm-manager/scm-manager/pull/1984)) diff --git a/scm-ui/ui-components/src/SyntaxHighlighterRenderer.tsx b/scm-ui/ui-components/src/SyntaxHighlighterRenderer.tsx index c814cb9448..d1d24a1768 100644 --- a/scm-ui/ui-components/src/SyntaxHighlighterRenderer.tsx +++ b/scm-ui/ui-components/src/SyntaxHighlighterRenderer.tsx @@ -61,6 +61,10 @@ const RowContainer = styled.div` &:hover i { visibility: visible; } + // override bulma default styling of .section + .section { + padding: 0; + } `; type CreateLinePermaLinkFn = (lineNumber: number) => string; diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap index 80fc739d54..d43e798510 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -4647,7 +4647,7 @@ exports[`Storyshots MarkdownView Code without Lang 1`] = ` } >