Skip to content
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
3 changes: 2 additions & 1 deletion dist/git-code-embed-dark.min.js

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

3 changes: 2 additions & 1 deletion dist/git-code-embed-light.min.js

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

3 changes: 2 additions & 1 deletion dist/git-code-embed.min.js

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

4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "git-code-embed",
"version": "0.2.0",
"version": "0.2.1",
"description": "Embed GitHub code snippets with syntax highlighting in blog posts",
"main": "dist/git-code-embed.min.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ ${THEME_COLORS}
@supports (scrollbar-color: auto) {
.gce-container .gce-code-wrap {
scrollbar-color: var(--gce-scrollbar-thumb) var(--gce-code-bg);
scrollbar-width: thin;
scrollbar-width: auto;
}
}

Expand All @@ -208,6 +208,7 @@ ${THEME_COLORS}
border-collapse: collapse;
width: 100%;
display: table;
margin: 0;
}

.gce-container .gce-table td.gce-lineno {
Expand Down
8 changes: 7 additions & 1 deletion test/styles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,16 @@ describe("CSS (テーマ: light)", () => {
expect(match![1]).toContain("color: var(--gce-code-text)");
});

it(".gce-table に margin: 0 を含む", () => {
const match = CSS.match(/\.gce-container \.gce-table \{([^}]*)\}/);
expect(match).not.toBeNull();
expect(match![1]).toContain("margin: 0");
});

it("scrollbar-color サポートブラウザ向けの @supports ブロックを含む", () => {
expect(CSS).toContain("@supports (scrollbar-color: auto)");
expect(CSS).toContain("scrollbar-color: var(--gce-scrollbar-thumb) var(--gce-code-bg)");
expect(CSS).toContain("scrollbar-width: thin");
expect(CSS).toContain("scrollbar-width: auto");
});

it("scrollbar-color 非対応ブラウザ向けの @supports not ブロックに webkit ルールを含む", () => {
Expand Down