Skip to content

Commit

Permalink
More stab at styling fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaBobs committed Jan 10, 2024
1 parent 7ee17e7 commit 255f997
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
13 changes: 8 additions & 5 deletions src/japanese/kana-table/KanaTable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
flex-direction: column;
width: 100%;
height: 100%;
font-size: 0.5vw;
font-size: 1vh;

.kana-grid {
display: grid;
Expand All @@ -17,7 +17,7 @@
}

.elevate {
box-shadow: 0 3px 5px 1px rgba(0, 0, 0, 0.5);
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.5);
}

.kana-cell-ghost {
Expand Down Expand Up @@ -46,6 +46,7 @@
align-items: end;
font-weight: bold;
grid-column: 1 / 2;
font-size: 2em;
}

&.kana {
Expand All @@ -54,7 +55,7 @@

.romaji {
color: rgb(70, 70, 70);
display: block;
// display: block;
}

> * {
Expand All @@ -76,18 +77,20 @@
flex-direction: row;
justify-content: center;
align-items: center;
padding: 2px;
width: 100%;
}

.hiragana {
width: 100%;
text-align: center;
padding: 1em;
// padding: 1em;
}

.katakana {
width: 100%;
padding: 1em;
text-align: center;
// padding: 1em;
}

&.no-katakana {
Expand Down
24 changes: 12 additions & 12 deletions src/japanese/kana-table/KanaTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,39 +162,39 @@ function KanaCell(props: {
className={`kana cell row-${props.rowIndex} col-${vowel} elevate`}
>
<div className={`kana-row base-row kana-${props.kana.romaji}`}>
<div className="hiragana">
<Flex down className="hiragana">
{props.kana.hiragana}{" "}
<span className="romaji">({props.kana.romaji})</span>
</div>
<div className="katakana">
</Flex>
<Flex down className="katakana">
{props.kana.katakana}{" "}
<span className="romaji">({props.kana.romaji})</span>
</div>
</Flex>
</div>
{props.kana.dakuten && (
<div className={`kana-row dakuten-row kana-${props.kana.dakuten}`}>
<div className="hiragana">
<Flex down className="hiragana">
{props.kana.hiragana + "゙"}{" "}
<span className="romaji">({props.kana.dakuten})</span>
</div>
<div className="katakana">
</Flex>
<Flex down className="katakana">
{props.kana.katakana + "゙"}{" "}
<span className="romaji">({props.kana.dakuten})</span>
</div>
</Flex>
</div>
)}
{props.kana.handakuten && (
<div
className={`kana-row handakuten-row kana-${props.kana.handakuten}`}
>
<div className="hiragana">
<Flex down className="hiragana">
{props.kana.hiragana + "゚"}{" "}
<span className="romaji">({props.kana.handakuten})</span>
</div>
<div className="katakana">
</Flex>
<Flex down className="katakana">
{props.kana.katakana + "゚"}{" "}
<span className="romaji">({props.kana.handakuten})</span>
</div>
</Flex>
</div>
)}
<div className="kana-cell-ghost" />
Expand Down

0 comments on commit 255f997

Please sign in to comment.