Skip to content

Commit fcb3a43

Browse files
committed
refactor
1 parent 55bafd0 commit fcb3a43

File tree

7 files changed

+45
-50
lines changed

7 files changed

+45
-50
lines changed

src/components/Icon.svelte

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
<script>
2-
export let name;
3-
$$restProps.class = `icon ${$$restProps.class || ""}`
2+
export let name;
3+
$$restProps.class = `icon ${$$restProps.class || ''}`;
44
</script>
55

6-
<style global lang="scss">
7-
.icon {
8-
width: 1em;
9-
height: 1em;
10-
display: inline-block;
11-
overflow: visible;
12-
fill: currentColor;
13-
}
14-
</style>
15-
166
<svg {...$$restProps}>
17-
<use href="#{name}"></use>
18-
</svg>
7+
<use href="#{name}" />
8+
</svg>
9+
10+
<style>
11+
.icon {
12+
@apply inline-block w-[1em] h-[1em] overflow-visible fill-current;
13+
}
14+
</style>

src/components/Sections/ProfileSection.svelte

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,3 @@
6868
</ul>
6969
</div>
7070
</section>
71-
72-
<style global lang="scss">
73-
.icon {
74-
&.envelope {
75-
@apply text-red-600;
76-
}
77-
78-
&.github-square {
79-
color: #333;
80-
}
81-
82-
&.whatsapp-square {
83-
color: #4fce5d;
84-
}
85-
86-
&.linkedin {
87-
color: #0e76a8;
88-
}
89-
}
90-
</style>

src/components/Tag.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
<div class="tag">{text}</div>
66

7-
<style global lang="scss">
7+
<style>
88
.tag {
9-
@apply text-sm inline-block font-medium border border-primary-500 rounded py-1.5 px-3;
9+
@apply inline-block rounded border border-primary-500 py-1.5 px-3 font-medium text-sm;
1010
}
1111
</style>

src/routes/__layout.svelte

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,7 @@
1111
</main>
1212

1313
<style global lang="scss">
14-
@tailwind base;
15-
@tailwind components;
16-
@tailwind utilities;
17-
@tailwind screens;
18-
19-
@layer base {
20-
:root {
21-
--text-body: theme("colors.gray.700");
22-
}
23-
24-
body {
25-
color: var(--text-body);
26-
}
27-
}
14+
@use "../stylesheets/tailwind.css";
15+
@use "../stylesheets/base.scss";
16+
@use "../stylesheets/icons.scss";
2817
</style>

src/stylesheets/base.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@layer base {
2+
:root {
3+
--text-body: theme("colors.gray.700");
4+
}
5+
6+
body {
7+
color: var(--text-body);
8+
}
9+
}

src/stylesheets/icons.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.icon {
2+
&.envelope {
3+
@apply text-red-600;
4+
}
5+
6+
&.github-square {
7+
color: #333;
8+
}
9+
10+
&.whatsapp-square {
11+
color: #4fce5d;
12+
}
13+
14+
&.linkedin {
15+
color: #0e76a8;
16+
}
17+
}

src/stylesheets/tailwind.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
@tailwind screens;

0 commit comments

Comments
 (0)