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 outline when tab and sidenav anchor elements are focused #185

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
14 changes: 14 additions & 0 deletions src/Header/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
Copyright 2021 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
.spectrum-Tabs-item:focus {
outline: auto;
}
8 changes: 8 additions & 0 deletions src/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import Menu from '@spectrum-icons/workflow/ShowMenu'
import { useMediaQuery } from 'react-responsive'
import { ThemeSwitcher } from '../Provider'

import './index.css'

const stretched = css`
height: 100%;
`
Expand Down Expand Up @@ -119,6 +121,9 @@ const Header = ({
href={titleUrl}
css={css`
text-decoration-line: none;
:focus {
outline: auto;
}
`}
>
<Flex alignItems='center' height='100%'>
Expand Down Expand Up @@ -148,6 +153,9 @@ const Header = ({
<Link
css={css`
text-decoration-line: none;
:focus {
outline: auto;
}
`}
to='/'
>
Expand Down
4 changes: 4 additions & 0 deletions src/SideNav/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
.spectrum-SideNav-itemLink:focus {
outline: auto;
}

.spectrum-SideNav-itemLink svg {
margin-right: var(
--spectrum-sidenav-icon-gap,
Expand Down