Skip to content

Commit 43622e7

Browse files
committed
优化 cm-lintPoint 样式
适配 Vite v8.2
1 parent aadd439 commit 43622e7

8 files changed

Lines changed: 43 additions & 16 deletions

File tree

‎SharpScript/SharpScript.csproj‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<PackageReference Include="ILAssembler" Version="11.0.0-build.8.1" />
1717
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.10" />
1818
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.10" PrivateAssets="all" />
19-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" Version="5.11.0-1.26379.13" />
20-
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Features" Version="5.11.0-1.26379.13" />
19+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" Version="5.11.0-1.26380.4" />
20+
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Features" Version="5.11.0-1.26380.4" />
2121
<PackageReference Include="Mobius.ILasm" Version="0.1.0" />
2222
<PackageReference Include="System.Security.Permissions" Version="10.0.10" />
2323
</ItemGroup>

‎SharpScript/Site/components/CodeMirror.vue‎

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,9 @@
305305
outline: none;
306306
307307
.cm-gutters {
308-
transition: $base-transition;
308+
border-right-width: 1px;
309+
border-right-style: solid;
310+
transition: $base-transition, border-color colors.$control-faster-animation-duration ease-in-out;
309311
310312
.cm-gutter-lint {
311313
width: 3px;
@@ -543,40 +545,62 @@
543545
opacity: 0.467;
544546
}
545547
548+
.cm-lintRange-hint::after,
549+
.cm-lintRange-info::after,
550+
.cm-lintPoint::after {
551+
border: none;
552+
width: 2px;
553+
height: 2px;
554+
border-radius: 50%;
555+
bottom: 0.5px;
556+
}
557+
558+
.cm-lintPoint::after {
559+
left: -1px;
560+
transition: background-color colors.$control-faster-animation-duration ease-in-out;
561+
}
562+
546563
.cm-lintRange-hint,
547564
.cm-lintRange-info {
548565
position: relative;
549566
550567
&::after {
551-
width: 2px;
552-
height: 2px;
553-
border-radius: 50%;
554568
content: '';
555569
position: absolute;
556-
bottom: 0.5px;
557570
left: 1px;
571+
transition: background-color colors.$control-faster-animation-duration ease-in-out,
572+
box-shadow colors.$control-faster-animation-duration ease-in-out;
558573
}
559574
}
560575
561-
.cm-lintRange-hint::after {
562-
transition: background-color colors.$control-faster-animation-duration ease-in-out,
563-
box-shadow colors.$control-faster-animation-duration ease-in-out;
576+
.cm-lintRange-hint:hover::after,
577+
.cm-lintRange-info::after,
578+
.cm-lintPoint-hint:hover::after,
579+
.cm-lintPoint-info::after {
580+
background: #a5a5a5;
564581
}
565582
566583
.cm-lintRange-hint:hover::after,
567584
.cm-lintRange-info::after {
568-
background: #a5a5a5;
569585
box-shadow: 3.5px 0 0 #a5a5a5;
570586
}
571587
572588
.cm-lintRange-warning {
573589
background-image: underline(#008000);
574590
}
575591
592+
.cm-lintPoint-warning::after {
593+
background: #008000;
594+
}
595+
576596
.cm-lintRange-error {
577597
background-image: underline(#ff0000);
578598
}
579599
600+
.cm-lintPoint-error::after {
601+
background: #ff0000;
602+
}
603+
580604
.cm-searchMatch {
581605
background-color: rgba(234, 92, 0, 0.33);
582606
}
@@ -627,7 +651,7 @@
627651
}
628652
629653
.cm-searchMatch-selected {
630-
background-color: #9e6a03;
654+
background-color: #9E6A03;
631655
}
632656
}
633657

‎SharpScript/Site/components/SplitPanels.vue‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@
321321
span.handle {
322322
border-radius: 1px;
323323
margin: $sizer-base-padding;
324+
transition: border-color colors.$control-faster-animation-duration ease-in-out;
324325
}
325326
326327
@include theme.auto-theme {

SharpScript/Site/helpers/dotnet-framework-static-files.ts renamed to SharpScript/Site/helpers/dotnet-framework-static-files.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
configureServer(server) {
99
server.middlewares.use((req, res, next) => {
1010
if (req.url && req.url.startsWith("/_framework")) {
11-
const frameworkRoot = path.resolve(__dirname, "../../bin/Release/net10.0-browser/publish/wwwroot");
11+
const frameworkRoot = path.resolve(import.meta.dirname, "../../bin/Release/net10.0-browser/publish/wwwroot");
1212
const rawPath = decodeURIComponent(req.url.split('?')[0]);
1313
let filePath = path.resolve(frameworkRoot, `.${rawPath}`);
1414
fs.stat(filePath, (err, stat) => {
File renamed without changes.

‎SharpScript/Site/helpers/theme.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export const vscodeDark = vscodeDarkInit({
99
selectionMatch: "#ADD6FF26",
1010
gutterForeground: "#6E7681",
1111
gutterActiveForeground: "#CCCCCC",
12+
gutterBorder: "#404040",
1213
fontFamily: "var(--font-monospace)"
1314
}
1415
});
@@ -18,6 +19,7 @@ export const vscodeLight = vscodeLightInit({
1819
selectionMatch: "#ADD6FF80",
1920
gutterForeground: "#6E7681",
2021
gutterActiveForeground: "#171184",
22+
gutterBorder: "#D3D3D3",
2123
fontFamily: "var(--font-monospace)"
2224
}
2325
});

‎SharpScript/Site/vite.config.mts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { defineConfig } from "vite";
22
import vue from "@vitejs/plugin-vue";
33
import svgLoader from "vite-svg-loader";
44
import simpleHtmlPlugin from "vite-plugin-simple-html";
5-
import dotnetFrameworkStaticFiles from "./helpers/dotnet-framework-static-files";
6-
import githubImporter from "./helpers/github-importer";
5+
import dotnetFrameworkStaticFiles from "./helpers/dotnet-framework-static-files.mts";
6+
import githubImporter from "./helpers/github-importer.mts";
77
import cssnano from "cssnano";
8-
import getOutputOptions from "./helpers/output";
8+
import getOutputOptions from "./helpers/output.mts";
99

1010
export default defineConfig(({ mode }) => {
1111
return {

0 commit comments

Comments
 (0)