Modification du style

- Modification des couleurs
- Ajout d'une animation sur les liens
This commit is contained in:
Lyanis SOUIDI 2023-01-17 22:20:58 +01:00
parent e38973f321
commit 3c9943bd47
2 changed files with 60 additions and 18 deletions

View File

@ -21,7 +21,7 @@ header h1 {
} }
#menu li a:hover { #menu li a:hover {
background-color: var(--c-menu-hover); background-color: var(--c-a-secondary);
} }
#menu li a { #menu li a {

View File

@ -1,20 +1,27 @@
:root { :root {
--c-bg: #0d1117; --c-a-primary: #0d1117;
--c-title: white; --c-a-secondary: #1c2431;
--c-text: #8b949e; --c-b-primary: white;
--c-menu-hover: #1c2431; --c-b-secondary: #ddd;
--c-links: #0087ca;
--c-bg: var(--c-a-primary);
--c-title: var(--c-b-primary);
--c-text: var(--c-b-secondary);
--c-bg-footer: var(--c-bg); --c-bg-footer: var(--c-bg);
--c-footer-text: var(--c-text); --c-footer-text: var(--c-b-primary);
} }
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
:root { :root {
--c-bg: white; --c-a-primary: white;
--c-title: black; --c-a-secondary: #ddd;
--c-text: black; --c-b-primary: #0d1117;
--c-menu-hover: #ddd; --c-b-secondary: #1c2431;
--c-bg: var(--c-a-primary);
--c-title: var(--c-b-primary);
--c-text: var(--c-b-secondary);
--c-bg-footer: #616A6B; --c-bg-footer: #616A6B;
--c-footer-text: white; --c-footer-text: var(--c-a-primary);
} }
} }
@ -44,17 +51,52 @@ h1, h2, h3, h4, h5, h6, .title {
} }
main { main {
padding: 0 3.75rem; width: 100%;
max-width: 1280px;
margin-right: auto;
margin-left: auto;
padding: 2rem 1rem;
}
main a {
display: inline-block;
position: relative;
color: var(--c-links);
text-decoration: none;
}
main a::after {
content: '';
position: absolute;
width: 100%;
transform: scaleX(0);
height: 2px;
bottom: 0;
left: 0;
background-color: var(--c-links);
transform-origin: bottom left;
transition: transform 0.25s ease-out;
}
main a:hover::after {
transform: scaleX(1);
transform-origin: bottom left;
}
@media screen and (min-width: 700px) {
.right {
grid-column: 2;
grid-row: 1;
}
.left {
grid-column: 1;
grid-row: 1;
}
} }
@media screen and (max-width: 700px) { @media screen and (max-width: 700px) {
main { .right, .left {
padding: 0 1.875rem; grid-column: 1;
}
}
@media screen and (max-width: 575px) {
main {
padding: 0 .625rem;
} }
} }