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

Fix callout block styles #4636

Merged
merged 1 commit into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions site/gdocs/components/Callout.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
.callout-heading {
@include h4-semibold;
margin-top: 0;
margin-bottom: 8px;
color: $blue-90;
}

.callout-icon {
margin-right: 8px;
}
8 changes: 6 additions & 2 deletions site/gdocs/components/Callout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ export default function Callout({
const icon = block.icon ? iconMap[block.icon] : null
return (
<div className={className}>
{icon && <FontAwesomeIcon className="callout-icon" icon={icon} />}
{block.title ? (
<h4 className="h4-semibold">{block.title}</h4>
<h4 className="callout-heading">
{icon && (
<FontAwesomeIcon className="callout-icon" icon={icon} />
)}
{block.title}
</h4>
) : null}
<ArticleBlocks blocks={block.text} />
</div>
Expand Down
21 changes: 12 additions & 9 deletions site/gdocs/components/centered-article.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1167,23 +1167,26 @@ div.raw-html-table__container {

// A small grey block
.article-block__callout {
h4 {
display: inline;
color: $blue-90;
margin-bottom: 8px;
margin-top: 8px;
.article-block__text,
.article-block__list,
.article-block__html,
.article-block__numbered-list {
@include body-3-regular;
margin-bottom: 0;

&:not(:last-child) {
margin-bottom: 8px;
}
}

a {
@include owid-link-90;
}
color: $blue-60;
background: $gray-10;
padding: 16px 24px;
border-radius: 8px;
margin: 32px 0;
p:last-child {
margin-bottom: 8px;
}
margin: 8px 0 32px;

+ .article-block__horizontal-rule {
margin-top: 24px;
Expand Down
4 changes: 0 additions & 4 deletions site/gdocs/pages/AboutPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@
.article-block__callout {
margin-top: 0;
margin-bottom: 24px;

.article-block__text {
font-size: 14px;
}
}

.article-block__code-snippet {
Expand Down