mirror of
https://github.com/Redocly/redoc.git
synced 2025-04-25 11:13:52 +03:00
fix: update focus styling
This commit is contained in:
parent
3d25005f08
commit
30a27c116b
|
@ -32,11 +32,12 @@ export const StyledDropdown = styled(Dropdown)`
|
||||||
font-size: 0.929em;
|
font-size: 0.929em;
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
transition: border 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus-within {
|
&:focus-within {
|
||||||
border: 1px solid ${props => props.theme.colors.primary.main};
|
border: 1px solid ${props => props.theme.colors.primary.main};
|
||||||
color: ${props => props.theme.colors.primary.main};
|
color: ${props => props.theme.colors.primary.main};
|
||||||
box-shadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12);
|
box-shadow: 0px 0px 0px 1px ${props => props.theme.colors.primary.main};
|
||||||
}
|
}
|
||||||
.dropdown-selector {
|
.dropdown-selector {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
@ -55,6 +56,7 @@ export const StyledDropdown = styled(Dropdown)`
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
color: #263238;
|
color: #263238;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
transition: color 0.25s ease, text-shadow 0.25s ease;
|
||||||
}
|
}
|
||||||
.dropdown-arrow {
|
.dropdown-arrow {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -73,7 +75,7 @@ export const StyledDropdown = styled(Dropdown)`
|
||||||
.dropdown-selector-content {
|
.dropdown-selector-content {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
left: -1px;
|
left: -2px;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
@ -90,7 +92,6 @@ export const StyledDropdown = styled(Dropdown)`
|
||||||
.dropdown-option {
|
.dropdown-option {
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
color: #263238;
|
color: #263238;
|
||||||
background-color: #fff;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 0.4em;
|
padding: 0.4em;
|
||||||
|
|
||||||
|
@ -102,6 +103,10 @@ export const StyledDropdown = styled(Dropdown)`
|
||||||
background-color: rgba(38, 50, 56, 0.12);
|
background-color: rgba(38, 50, 56, 0.12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
input {
|
||||||
|
cursor: pointer;
|
||||||
|
height: 1px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -122,6 +127,7 @@ export const SimpleDropdown = styled(StyledDropdown)`
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
.dropdown-selector-value {
|
.dropdown-selector-value {
|
||||||
color: ${props => props.theme.colors.primary.main};
|
color: ${props => props.theme.colors.primary.main};
|
||||||
|
text-shadow: 0px 0px 0px ${props => props.theme.colors.primary.main};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ export const linkifyMixin = className => css`
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
outline: 0;
|
||||||
}
|
}
|
||||||
${className}:before {
|
${className}:before {
|
||||||
content: '';
|
content: '';
|
||||||
|
|
|
@ -5,7 +5,9 @@ export const SampleControls = styled.div`
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
transition: opacity 0.3s ease;
|
transition: opacity 0.3s ease;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
&:focus-within {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
> button {
|
> button {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
|
|
@ -33,6 +33,9 @@ export const Tabs = styled(ReactTabs)`
|
||||||
&.react-tabs__tab--selected {
|
&.react-tabs__tab--selected {
|
||||||
color: ${props => props.theme.colors.text.primary};
|
color: ${props => props.theme.colors.text.primary};
|
||||||
background: ${({ theme }) => theme.rightPanel.textColor};
|
background: ${({ theme }) => theme.rightPanel.textColor};
|
||||||
|
&:focus {
|
||||||
|
outline: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:only-child {
|
&:only-child {
|
||||||
|
|
|
@ -38,7 +38,7 @@ export const EndpointInfo = styled.button<{ expanded?: boolean; inverted?: boole
|
||||||
color: ${props => (props.inverted ? props.theme.colors.text.primary : '#ffffff')}
|
color: ${props => (props.inverted ? props.theme.colors.text.primary : '#ffffff')}
|
||||||
}
|
}
|
||||||
&:focus {
|
&:focus {
|
||||||
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.3), 0 2px 0 rgba(128, 128, 128, 0.15);
|
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.45), 0 2px 0 rgba(128, 128, 128, 0.25);
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ export const InvertedSimpleDropdown = styled(StyledDropdown)`
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus-within {
|
&:focus-within {
|
||||||
border: none;
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
&:focus-within {
|
&:focus-within {
|
||||||
background-color: ${({ theme }) => transparentize(0.3, theme.rightPanel.backgroundColor)};
|
background-color: ${({ theme }) => transparentize(0.3, theme.rightPanel.backgroundColor)};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user