Skip to content

Commit e4e8c38

Browse files
committed
fix: moved component style to component file
1 parent 15a1e77 commit e4e8c38

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

pages/diff/_diff.vue

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,49 @@ export default {
167167
}
168168
</script>
169169

170-
<style>
170+
<style lang="scss">
171171
.copy-uri-button:hover {
172172
@apply shadow-lg;
173+
svg {
174+
@apply scale-110 rotate-12;
175+
}
173176
}
174-
.copy-uri-button:hover svg {
175-
@apply scale-110 rotate-12;
177+
178+
/* line numbers in diff view */
179+
.line-numbers {
180+
counter-reset: line-numbers;
181+
@apply relative;
182+
&::before {
183+
content: '';
184+
position: absolute;
185+
top: 0;
186+
bottom: 0;
187+
left: 0;
188+
width: calc(var(--max-line-number-characher) + 4px);
189+
@apply bg-gray-100;
190+
}
191+
p {
192+
padding-left: calc(var(--max-line-number-characher) - 4px);
193+
@apply relative;
194+
&:hover {
195+
@apply bg-gray-200;
196+
}
197+
&::before {
198+
counter-increment: line-numbers;
199+
content: counter(line-numbers);
200+
width: calc(var(--max-line-number-characher) + 4px);
201+
@apply absolute left-0 top-0 -mx-4 bottom-0 text-center bg-gray-200 text-gray-500 flex justify-center items-center text-sm;
202+
}
203+
&:first-of-type {
204+
&::before {
205+
@apply -mt-2 pt-2;
206+
}
207+
}
208+
&:last-of-type {
209+
&::before {
210+
@apply -mb-2 pb-2;
211+
}
212+
}
213+
}
176214
}
177215
</style>

static/global.scss

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -29,41 +29,3 @@ main {
2929
::-webkit-scrollbar-thumb:hover {
3030
background: #555;
3131
}
32-
33-
/* line numbers in diff view */
34-
.line-numbers {
35-
counter-reset: line-numbers;
36-
@apply relative;
37-
&::before {
38-
content: '';
39-
position: absolute;
40-
top: 0;
41-
bottom: 0;
42-
left: 0;
43-
width: calc(var(--max-line-number-characher) + 4px);
44-
@apply bg-gray-100;
45-
}
46-
p {
47-
padding-left: calc(var(--max-line-number-characher) - 4px);
48-
@apply relative;
49-
&:first-of-type {
50-
&::before {
51-
@apply -mt-2 pt-2;
52-
}
53-
}
54-
&:last-of-type {
55-
&::before {
56-
@apply -mb-2 pb-2;
57-
}
58-
}
59-
&:hover {
60-
@apply bg-gray-200;
61-
}
62-
&::before {
63-
counter-increment: line-numbers;
64-
content: counter(line-numbers);
65-
width: calc(var(--max-line-number-characher) + 4px);
66-
@apply absolute left-0 top-0 -mx-4 bottom-0 text-center bg-gray-200 text-gray-500 flex justify-center items-center text-sm;
67-
}
68-
}
69-
}

0 commit comments

Comments
 (0)