1
Fork 0
mirror of https://github.com/Steffo99/steffoweb.git synced 2024-11-21 15:44:31 +00:00

Improve links accessibility

This commit is contained in:
Steffo 2023-02-28 13:01:43 +01:00
parent b5df20d445
commit 746d92b7ad
Signed by: steffo
GPG key ID: 2A24051445686895
2 changed files with 21 additions and 4 deletions

View file

@ -1,6 +1,9 @@
.linkPanel {
text-decoration: none;
white-space: nowrap;
flex-direction: row;
gap: 8px;
align-items: center;
}
.linkPanel:hover, .linkPanel:focus {
@ -10,3 +13,14 @@
.linkPanel:active {
--bhsl-current-lightness: calc(var(--bhsl-link-lightness) + 40%);
}
.linkPanelIcon {
justify-self: center;
width: 20px;
flex-shrink: 0;
}
.linkPanelText {
flex-grow: 1;
justify-self: flex-start;
}

View file

@ -17,9 +17,12 @@ export type LinkPanelProps = {
export const LinkPanel = ({href, icon, text, me, fade}: LinkPanelProps) => {
const panel = (
<span>
<FontAwesomeIcon icon={icon}/>&nbsp;{text}
</span>
<>
<FontAwesomeIcon className={style.linkPanelIcon} icon={icon}/>
<span className={style.linkPanelText}>
{text}
</span>
</>
)
if(href) {