Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dea7fc2

Browse filesBrowse files
committed
docs: prevent layout from moving during loading
1 parent 5757468 commit dea7fc2
Copy full SHA for dea7fc2

File tree

2 files changed

+6
-2
lines changed
Filter options

2 files changed

+6
-2
lines changed

‎packages/docs/src/components/Ads.tsx

Copy file name to clipboardExpand all lines: packages/docs/src/components/Ads.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const Ads: FC<AdsProps> = ({ code, location, placement }) => {
1919
}
2020
}, [location])
2121

22-
return <div ref={ref} />
22+
return <div className="carbonads-wrapper" ref={ref} />
2323
}
2424

2525
Ads.displayName = 'Ads'

‎packages/docs/src/styles/_ads.scss

Copy file name to clipboardExpand all lines: packages/docs/src/styles/_ads.scss
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
// Carbon ads
55
//
66

7+
.carbonads-wrapper {
8+
min-height: 130px;
9+
margin: 2rem 0;
10+
}
11+
712
#carbonads {
813
position: static;
914
display: block;
1015
max-width: 400px;
1116
padding: 15px 15px 15px 160px;
12-
margin: 2rem 0;
1317
overflow: hidden;
1418
@include font-size(.8125rem);
1519
line-height: 1.4;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.