High contrast mode findings (#1892)

Fixes most of the flaws in high contrast mode.
This commit is contained in:
Florian Scholdei
2021-12-16 17:54:39 +01:00
committed by GitHub
parent 089862b7ef
commit 16960d742e
42 changed files with 937 additions and 722 deletions

View File

@@ -45,7 +45,7 @@ const FullSizedModal = styled(Modal)`
const FullscreenModal: FC<Props> = ({ title, closeFunction, body, active, closeButtonLabel }) => {
const [t] = useTranslation("repos");
const footer = <Button label={closeButtonLabel || t("diff.fullscreen.close")} action={closeFunction} color="grey" />;
const footer = <Button label={closeButtonLabel || t("diff.fullscreen.close")} action={closeFunction} color="secondary" />;
return <FullSizedModal title={title} closeFunction={closeFunction} body={body} footer={footer} active={active} />;
};

View File

@@ -45,7 +45,7 @@ type Props = {
};
const SizedModal = styled.div<{ size?: ModalSize }>`
width: ${(props) => (props.size ? `${modalSizes[props.size]}%` : "640px")};
width: ${props => (props.size ? `${modalSizes[props.size]}%` : "640px")};
`;
export const Modal: FC<Props> = ({
@@ -55,9 +55,9 @@ export const Modal: FC<Props> = ({
footer,
active,
className,
headColor = "light",
headTextColor = "black",
size,
headColor = "secondary-less",
headTextColor = "secondary-most",
size
}) => {
const portalRootElement = usePortalRootElement("modalsRoot");
const initialFocusRef = useRef(null);
@@ -65,7 +65,7 @@ export const Modal: FC<Props> = ({
includeContainer: true,
initialFocus: initialFocusRef.current,
returnFocus: true,
updateNodes: false,
updateNodes: false
});
if (!portalRootElement) {