Skip to content

Commit 305a29e

Browse files
committed
Twoslash: Improve default CSS
1 parent 24ea50d commit 305a29e

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

Diff for: packages/twoslash/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"author": "Fuma Nama",
1414
"type": "module",
1515
"exports": {
16-
"./twoslash.css": "./dist/twoslash.css",
16+
"./twoslash.css": "./styles/twoslash.css",
1717
".": {
1818
"import": "./dist/index.js",
1919
"types": "./dist/index.d.ts"
@@ -30,7 +30,8 @@
3030
"main": "./dist/index.js",
3131
"types": "./dist/index.d.ts",
3232
"files": [
33-
"dist/*"
33+
"dist/*",
34+
"styles/*"
3435
],
3536
"scripts": {
3637
"build": "tsup",

Diff for: packages/twoslash/styles/twoslash.css

+3-4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
.twoslash-popup-docs-tag {
5454
display: flex;
55-
flex-direction: column;
55+
flex-direction: row;
5656
gap: 0.5em;
5757
}
5858

@@ -61,8 +61,8 @@
6161
}
6262

6363
.twoslash-popup-code {
64-
font-size: 14px;
65-
display: block !important;
64+
font-size: 13px !important;
65+
overflow-wrap: anywhere;
6666
}
6767

6868
.twoslash-popup-code .line {
@@ -74,7 +74,6 @@
7474
font-size: 14px !important;
7575
line-height: 20px !important;
7676
margin-top: 8px !important;
77-
color: var(--color-fd-muted-foreground);
7877
}
7978

8079
/* ===== Hover Info ===== */

Diff for: packages/twoslash/tsup.config.ts

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
import * as fs from 'node:fs/promises';
21
import { defineConfig } from 'tsup';
32

43
export default defineConfig({
54
dts: true,
65
target: 'es6',
76
format: 'esm',
8-
async onSuccess() {
9-
await fs.copyFile('./styles/twoslash.css', './dist/twoslash.css');
10-
},
117
entry: ['src/index.ts', 'src/cache-fs.ts', 'src/ui/index.ts'],
128
});

0 commit comments

Comments
 (0)