Skip to content

Commit

Permalink
fix(component): Astro requires in-file CSS for scoping (#6)
Browse files Browse the repository at this point in the history
It will be in a global style if imported from a raw file.
  • Loading branch information
5ouma authored Nov 8, 2024
1 parent 1b2f93e commit c7c6684
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 37 deletions.
40 changes: 39 additions & 1 deletion src/components/Bio/Bio.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
import "../../styles/global.css";
import "./style.css";
export type Props = {
name: string;
Expand All @@ -22,3 +21,42 @@ const props = Astro.props;
</div>
<span id="description">{props.description}</span>
</div>

<style>
#bio {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
gap: 0.5rem;
}

#profile {
display: flex;
align-items: center;
gap: 1rem;
}

img {
width: 6rem;
height: auto;
}

span {
font-family: "LINE Seed JP", sans-serif;
font-style: normal;
line-height: normal;
color: var(--foreground);
}

#name {
font-size: 2.5rem;
font-weight: bold;
}

#description {
font-size: 0.9rem;
font-weight: normal;
white-space: pre-line;
}
</style>
36 changes: 0 additions & 36 deletions src/components/Bio/style.css

This file was deleted.

0 comments on commit c7c6684

Please sign in to comment.