Skip to content

Commit

Permalink
Fix: Improve defaults styles for embeds
Browse files Browse the repository at this point in the history
  • Loading branch information
sandypockets committed Dec 16, 2023
1 parent 058e538 commit 0205292
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/index.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/plugins/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function embed() {
case 'youtube':
const embedUrl = transformYouTubeUrl(url);
node.type = 'raw';
node.value = `<iframe src="${embedUrl}" width="100%" height="100%" title="YouTube video player" frameborder="0" allowfullscreen></iframe>`;
node.value = `<iframe class="epic-remark-youtube" src="${embedUrl}" width="100%" title="YouTube video player" frameborder="0" allowfullscreen></iframe>`;
break;
case 'iframe':
node.type = 'raw';
Expand Down
15 changes: 13 additions & 2 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@
border-spacing: 0;
background-color: #1a1a1a;
border-radius: 0.5rem;
margin-top: 0.125rem;
margin-bottom: 0.125rem;
margin: 0.125rem;
}

.markdown table tbody {
Expand Down Expand Up @@ -253,6 +252,18 @@ ul.markdown.toc {
font-size: 0.9rem;
}

div.epic-remark-gist {
height: 400px;
}

div.epic-remark-gist > iframe {
height: 100%;
}

iframe.epic-remark-youtube {
height: 400px;
}

@media (max-width: 768px) {
.markdown table th,
.markdown table td {
Expand Down

0 comments on commit 0205292

Please sign in to comment.