diff --git a/dist/git-code-embed-dark.min.js b/dist/git-code-embed-dark.min.js index 9c08558..d61a879 100644 --- a/dist/git-code-embed-dark.min.js +++ b/dist/git-code-embed-dark.min.js @@ -173,7 +173,7 @@ ${It} @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; } } @@ -189,6 +189,7 @@ ${It} border-collapse: collapse; width: 100%; display: table; + margin: 0; } .gce-container .gce-table td.gce-lineno { diff --git a/dist/git-code-embed-light.min.js b/dist/git-code-embed-light.min.js index d85ae06..49525bb 100644 --- a/dist/git-code-embed-light.min.js +++ b/dist/git-code-embed-light.min.js @@ -173,7 +173,7 @@ ${It} @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; } } @@ -189,6 +189,7 @@ ${It} border-collapse: collapse; width: 100%; display: table; + margin: 0; } .gce-container .gce-table td.gce-lineno { diff --git a/dist/git-code-embed.min.js b/dist/git-code-embed.min.js index d51844b..e871018 100644 --- a/dist/git-code-embed.min.js +++ b/dist/git-code-embed.min.js @@ -173,7 +173,7 @@ ${It} @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; } } @@ -189,6 +189,7 @@ ${It} border-collapse: collapse; width: 100%; display: table; + margin: 0; } .gce-container .gce-table td.gce-lineno { diff --git a/package-lock.json b/package-lock.json index 1400594..26ee896 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "git-code-embed", - "version": "0.2.0", + "version": "0.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "git-code-embed", - "version": "0.2.0", + "version": "0.2.1", "devDependencies": { "@types/node": "^24.12.0", "esbuild": "^0.27.3", diff --git a/package.json b/package.json index 6e4e7c4..54c5be7 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/styles.ts b/src/styles.ts index 5cc759b..3c9695e 100644 --- a/src/styles.ts +++ b/src/styles.ts @@ -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; } } @@ -208,6 +208,7 @@ ${THEME_COLORS} border-collapse: collapse; width: 100%; display: table; + margin: 0; } .gce-container .gce-table td.gce-lineno { diff --git a/test/styles.test.ts b/test/styles.test.ts index bd521ff..09fc1b1 100644 --- a/test/styles.test.ts +++ b/test/styles.test.ts @@ -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 ルールを含む", () => {