Skip to content

Commit

Permalink
Scale font size on small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonbaeten committed Jun 4, 2024
1 parent 45e4cf3 commit ddf666b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/svg+xml" href="./src/icon.svg">
<meta name="description"
content="Welke ervaring heb je opgedaan met deze beroepsactiviteit in de praktijk (in een huisartsgeneekundige setting)?">
Expand Down
2 changes: 1 addition & 1 deletion src/ThemeSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function ThemeSection({
className="theme"
>
<h3>
<span style={{ background: color }}>{themeIndex + 1}</span>
<span>{themeIndex + 1}</span>
{name}
</h3>
</th>
Expand Down
2 changes: 1 addition & 1 deletion src/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
},
{
"name": "Preventie",
"color": "#fed702",
"color": "#e9c701",
"experiences": [
{
"name": "Stelt, samen met een patiënt, een individueel zorgplan op ter preventie van een chronische ziekte.",
Expand Down
29 changes: 23 additions & 6 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

html {
box-sizing: border-box;
font-size: 16px;
}

html,
Expand All @@ -11,7 +10,6 @@ body {
padding: 0;
margin: 0;
width: 100%;
min-width: 460px;
}

*,
Expand Down Expand Up @@ -53,6 +51,7 @@ body {
line-height: 1.4;
padding: 2rem;
position: relative;
font-size: 16px;
}

@media screen and (max-width: 768px) {
Expand All @@ -61,6 +60,12 @@ body {
}
}

@media screen and (max-width: 460px) {
html, body {
font-size: 3.4vw;
}
}

h1 {
font-size: 2rem;
margin-bottom: 1rem;
Expand Down Expand Up @@ -155,13 +160,14 @@ th {
border: 1px solid #f0f0f0;
vertical-align: middle;
min-width: 2rem;
padding: 0;
}

/* table form styling */

table.form th.theme {
border: 1px solid;
padding: 1.5rem 1rem;
padding: 1.25rem;
}

table.form td.white {
Expand Down Expand Up @@ -200,11 +206,22 @@ table.form h3 {
margin: 0;
padding: 0;
color: white;
text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
font-size: 1.5rem;
line-height: 1.3;
}

table.form h3 span {
margin-right: 0.5rem;
display: inline-block;
width: 2rem;
height: 2rem;
font-size: 1rem;
line-height: 2rem;
text-align: center;
border-radius: 1rem;
margin-right: 1rem;
background-color: rgba(0, 0, 0, 0.15);
vertical-align: top;
}

table.form tbody input {
Expand Down Expand Up @@ -322,7 +339,7 @@ table.form tr.selectable:hover {
[data-tooltip]::before {
content: "";
position: absolute;
top: -1px;
top: 0;
left: 50%;
transform: translateX(-50%);
border-width: 0.25rem 0.5rem 0 0.5rem;
Expand Down

0 comments on commit ddf666b

Please sign in to comment.