Skip to content

Commit

Permalink
Fix captions in posts caused by the randomly inserted <p> tag
Browse files Browse the repository at this point in the history
Get rid of the extra paragraph tag that is randomly inserted by Ghost to wrap the caption text.
  • Loading branch information
adamkudrna committed Apr 24, 2024
1 parent 7e42eb1 commit 5f30936
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/scss/styles/08-koenig/_card.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Basic styling for all Ghost content blocks.
// Ghost docs: https://ghost.org/docs/themes/content/#figure-and-figcaption
//
// 1. Get rid of the extra paragraph tag that is randomly inserted by Ghost to wrap the caption text.

@use "../../tools/breakpoint";
@use "../../tools/content-block";
Expand All @@ -17,6 +19,10 @@
}
}

.kg-card figcaption > p {
display: contents; // 1.
}

.kg-embed-card {
display: flex;
justify-content: center;
Expand Down

0 comments on commit 5f30936

Please sign in to comment.