Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: add button-link border & a11y styles #139

Merged
merged 2 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 73 additions & 2 deletions components/button-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,92 @@ class ButtonLink extends HTMLElement {
background-color: var(--primary);
}

a.primary:focus {
outline: 3px solid var(--primary);
outline-offset: 2px;
border-radius: 10px;
}

a.primary:focus-visible {
outline: 3px solid var(--secondary);
outline-offset: 2px;
border-radius: 10px;
}

a.primary:hover {
background-color: #5536de;
font-weight: var(--font-weight-bold);
}

a.primary:active {
background-color: #160b46;
color: white;
}

a.ghost {
border: none;
border-radius: 0;
}

a.small.ghost {
padding: 0;
padding: 10px 20px;
}

a.small.ghost:focus {
outline: 3px solid var(--primary);
outline-offset: 2px;
border-radius: 10px;
}

a.small.ghost:focus-visible {
outline: 3px solid var(--secondary);
outline-offset: 2px;
border-radius: 10px;
}

a.small.ghost:hover {
font-weight: var(--font-weight-bold);
}

a.small.ghost:active {
color: #846de9;
}

a.big.ghost {
padding: auto;
color: black;
font-weight: normal;
border-radius: 10px;
border: 2px solid black;
background: white;
border: 3px solid transparent;
background-clip: padding-box, border-box;
background-origin: padding-box, border-box;
background-image: linear-gradient(white, white),
linear-gradient(135deg, var(--secondary), var(--primary));

@media only screen and (min-width: 768px) {
border-width: 5px;
}
}

a.big.ghost:focus {
outline: 3px solid var(--primary);
outline-offset: 2px;
border-radius: 10px;
}

a.big.ghost:focus-visible {
outline: 3px solid var(--secondary);
outline-offset: 2px;
border-radius: 10px;
}

a.big.ghost:hover {
font-weight: var(--font-weight-bold);
}

a.big.ghost:active {
color: var(--primary);
}

@media only screen and (min-width: 768px) {
Expand Down
4 changes: 2 additions & 2 deletions components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ class Header extends HTMLElement {
.buttons-container {
display: none;
align-items: center;
column-gap: 40px;
column-gap: 30px;

@media only screen and (min-width: 768px) {
display: flex !important;
flex-direction: row !important;
align-items: center !important;
column-gap: 40px !important;
column-gap: 30px !important;
margin-top: 0 !important;
}
}
Expand Down