Update CSS text variables

This commit is contained in:
Timothée Goguely 2024-09-03 18:38:09 +02:00
parent 435703cc05
commit d59e3441a4
6 changed files with 22 additions and 23 deletions

View file

@ -39,10 +39,10 @@
--space-2xl: 2rem; /* 32px */ --space-2xl: 2rem; /* 32px */
/* Type scale */ /* Type scale */
--text-sm: 0.75rem; /* 12px */ --text-xs: .75rem; /* 12px */
--text-md: 0.875rem; /* 14px */ --text-sm: .875rem; /* 14px */
--text-lg: 0.9375rem; /* 16px */ --text-md: 1rem; /* 16px */
--text-xl: 1.5rem; /* 24px */ --text-lg: 1.5rem; /* 24px */
/* Leading */ /* Leading */
--leading-none: 1; --leading-none: 1;

View file

@ -9,7 +9,7 @@
padding: var(--space-md) var(--space-lg); padding: var(--space-md) var(--space-lg);
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
font-size: var(--text-md); font-size: var(--text-sm);
line-height: var(--leading-md); line-height: var(--leading-md);
font-weight: 500; font-weight: 500;
border-radius: var(--rounded-md); border-radius: var(--rounded-md);

View file

@ -8,7 +8,7 @@
padding: var(--space-xs) var(--space-md); padding: var(--space-xs) var(--space-md);
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
font-size: var(--text-md); font-size: var(--text-sm);
font-weight: 500; font-weight: 500;
border-radius: var(--rounded-full); border-radius: var(--rounded-full);
background-color: var(--background, var(--color-primary-100)); background-color: var(--background, var(--color-primary-100));

View file

@ -22,21 +22,16 @@
/* Font sizes */ /* Font sizes */
.text-sm { .text-sm {
font-size: 1rem; font-size: var(--text-sm); /* 14px */
font-size: var(--text-sm);
line-height: 1.5; /* 24px */
}
.text-md {
font-size: var(--text-md);
line-height: 1.4285714286; /* 20px */ line-height: 1.4285714286; /* 20px */
} }
.text-lg { .text-md {
font-size: var(--text-lg); font-size: var(--text-md); /* 16px */
line-height: 1.5; /* 24px */ line-height: 1.5; /* 24px */
} }
.text-xl { .text-lg {
font-size: var(--text-xl); font-size: var(--text-lg); /* 24px */
line-height: 1.111; line-height: 1.5; /* 36px */
} }

View file

@ -30,7 +30,7 @@
</aside> </aside>
</template> </template>
<style> <style scoped>
button[aria-controls="menu"] { button[aria-controls="menu"] {
position: fixed; position: fixed;
@ -91,6 +91,7 @@
content: attr(data-count); content: attr(data-count);
display: inline-block; display: inline-block;
color: var(--color-primary); color: var(--color-primary);
font-size: var(--text-sm);
font-weight: 500; font-weight: 500;
margin-left: auto; margin-left: auto;
} }

View file

@ -2,11 +2,12 @@
<h1 class="sr-only">{{ data.content.title }}</h1> <h1 class="sr-only">{{ data.content.title }}</h1>
<div class="with-sidebar"> <div class="with-sidebar">
<Menu /> <Menu />
<!-- TODO: convert to Tabs.vue component --> <!-- TODO: convert to TabList.vue component -->
<main> <main>
<h2 id="tabslist" class="sr-only">Projets</h2> <h2 id="tabslist" class="sr-only">Projets</h2>
<header role="tablist" <header role="tablist"
aria-labelledby="tablist"> aria-labelledby="tablist">
<!-- Tab.vue -->
<button id="projets-en-cours-label" <button id="projets-en-cours-label"
type="button" type="button"
role="tab" role="tab"
@ -30,6 +31,7 @@
<span class="count">8</span> <span class="count">8</span>
</button> </button>
</header> </header>
<!-- TabPanel.vue -->
<section id="projets-en-cours" <section id="projets-en-cours"
role="tabpanel" role="tabpanel"
tabindex="0" tabindex="0"
@ -78,7 +80,7 @@
</div> </div>
</template> </template>
<style> <style scoped>
/* TABS */ /* TABS */
@ -99,7 +101,7 @@
position: relative; position: relative;
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
font-size: var(--text-lg); font-size: var(--text-md);
border-radius: var(--rounded-full); border-radius: var(--rounded-full);
background-color: var(--background, var(--color-background)); background-color: var(--background, var(--color-background));
color: var(--color, var(--color-text)); color: var(--color, var(--color-text));
@ -119,6 +121,7 @@
font-family: var(--font-serif); font-family: var(--font-serif);
} }
[role="tab"] .count { [role="tab"] .count {
font-size: var(--text-sm);
font-weight: 500; font-weight: 500;
} }
@ -160,7 +163,7 @@
} }
.project-item h3 { .project-item h3 {
font-family: var(--font-serif); font-family: var(--font-serif);
font-size: var(--text-xl); font-size: var(--text-lg);
margin-bottom: var(--space-sm); margin-bottom: var(--space-sm);
} }
.project-item p { .project-item p {