File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import React from 'react';
2
2
import propTypes from 'prop-types' ;
3
3
4
4
import styled from 'styled-components' ;
5
- import { createBorderStyles , createBoxStyles } from '../common' ;
5
+ import { createBorderStyles , createBoxStyles , focusOutline } from '../common' ;
6
6
import { blockSizes , padding } from '../common/system' ;
7
7
8
8
const StyledTab = styled . button `
@@ -23,7 +23,16 @@ const StyledTab = styled.button`
23
23
cursor: default;
24
24
color: ${ ( { theme } ) => theme . text } ;
25
25
user-select: none;
26
-
26
+ &:focus:after {
27
+ content: '';
28
+ position: absolute;
29
+ left: 0;
30
+ top: 0;
31
+ width: 100%;
32
+ height: 100%;
33
+ ${ focusOutline }
34
+ outline-offset: -6px;
35
+ }
27
36
${ props =>
28
37
props . selected &&
29
38
`
@@ -35,7 +44,7 @@ const StyledTab = styled.button`
35
44
margin-left: -8px;
36
45
margin-right: -8px;
37
46
` }
38
- &:after {
47
+ &:before {
39
48
content: '';
40
49
position: absolute;
41
50
width: calc(100% - 4px);
You can’t perform that action at this time.
0 commit comments