-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
319 overlay accessibility reworked (#391)
* Make overlay and handbook accessible * Add click-outside handling to overlay --------- Co-authored-by: Chris Wilton-Magras <[email protected]> Co-authored-by: George Sproston <[email protected]> Co-authored-by: Heather Logan <[email protected]>
- Loading branch information
1 parent
46def3d
commit 028f29f
Showing
20 changed files
with
177 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
#export-chat-box a { | ||
.export-chat-link { | ||
color: var(--main-button-inactive-text-colour); | ||
text-decoration: none; | ||
/* fill the entire space */ | ||
height: 100%; | ||
width: 100%; | ||
/* vertically centre text */ | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 7 additions & 6 deletions
13
frontend/src/components/HandbookOverlay/HandbookAttacks.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
#handbook-attacks { | ||
.handbook-attacks { | ||
display: grid; | ||
gap: 1rem 0.5rem; | ||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); | ||
} | ||
|
||
.handbook-attack { | ||
.handbook-attacks .attack { | ||
background-color: var(--overlay-attack-background-colour); | ||
border-radius: 10px; | ||
padding: 0 10px; | ||
margin: 5px; | ||
font-size: 0.8rem; | ||
margin: 0 0.25rem; | ||
border-radius: 0.5rem; | ||
padding: 0 0.625rem; | ||
font-size: 0.875rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
#handbook-overlay-content { | ||
.handbook-overlay { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
height: 100%; | ||
} | ||
|
||
.handbook-overlay .content { | ||
flex: 0 1 auto; | ||
text-align: center; | ||
overflow-y: auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 9 additions & 43 deletions
52
frontend/src/components/HandbookOverlay/HandbookOverlayTabs.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,23 @@ | ||
.handbook-tabs { | ||
display: flex; | ||
flex-wrap: wrap; | ||
width: 100%; | ||
position: absolute; | ||
top: -50px; /* position above overlay */ | ||
left: 2rem; | ||
z-index: -1; | ||
gap: 0.5rem; | ||
} | ||
|
||
.handbook-tabs label { | ||
.handbook-tabs button { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
border: 1px solid var(--overlay-tab-colour); | ||
border-radius: 0.5rem; | ||
padding: 1rem 2rem; | ||
margin-right: 0.0625rem; | ||
cursor: pointer; | ||
background-color: var(--overlay-closed-tab-colour); | ||
background-color: var(--overlay-background-colour); | ||
font-size: 1rem; | ||
font-weight: 700; | ||
line-height: 1; | ||
transition: ease 0.1s; | ||
border-radius: 10px 10px 0 0; | ||
} | ||
|
||
.handbook-tabs label:not(:first-child):not(:last-child) { | ||
border-right: 2px solid #000; | ||
} | ||
|
||
.handbook-tabs [type="radio"] { | ||
display: none; | ||
} | ||
|
||
.handbook-tabs [type="radio"]:checked + label { | ||
background-color: var(--overlay-background-colour); | ||
} | ||
|
||
.handbook-tabs [type="radio"]:checked + label + .tab { | ||
display: block; | ||
} | ||
|
||
@media (min-width: 768px) { | ||
body { | ||
font-size: 1.125rem; | ||
} | ||
|
||
.handbook-tabs-container { | ||
padding: 4rem 4rem; | ||
} | ||
|
||
.handbook-tabs label { | ||
order: 1; | ||
width: auto; | ||
} | ||
|
||
.handbook-tabs .tab { | ||
order: 9; | ||
} | ||
.handbook-tabs button[aria-selected="true"] { | ||
background-color: var(--overlay-tab-colour); | ||
} |
Oops, something went wrong.