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: remove table formatting from github gists #416

Merged
merged 6 commits into from May 23, 2022

Conversation

brettohland
Copy link
Contributor

When using the gist shortcode to include a code block into the site, the css code generated from the _markdown.scss will cause the gist to include extra padding and bottom borders due to how the table css is laid out.

Screen Shot 2022-05-22 at 9 31 34 AM

This is the problematic line..

It seems that there's already a structure in place to solve this issue, as there's already a utility method that wraps all written <table> tags in <div="table-wrap"> tags. So this PR moved the scss to only target those tables.

This results in the correct look:

Screen Shot 2022-05-22 at 9 39 49 AM

@thegeeklab-bot
Copy link

thegeeklab-bot commented May 22, 2022

LHCI Report Overview

Report URL Performance Accessibility Best-Practices SEO PWA
Link http://localhost:33477/ 94 % 100 % 92 % 98 % 30 %
Link http://localhost:33477/404.html 85 % 100 % 100 % 100 % 30 %
Link http://localhost:33477/posts/ 92 % 100 % 100 % 100 % 30 %

Copy link
Member

@xoxys xoxys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Just a small change request.

width: 100%;
text-align: left;
.table-wrap {
table:not(.lntable) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to do the opposite and use table:not(.lntable):not(.gist .highlight).

@xoxys xoxys changed the title fix: fix CSS issue with gist embeds fix: remove table formatting from github gists May 23, 2022
@xoxys
Copy link
Member

xoxys commented May 23, 2022

Fixed CI and added a Gist usage example. Thanks again!

@xoxys xoxys merged commit 61ef821 into thegeeklab:main May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants