Add 's' method to access theme props (#5163)

This commit is contained in:
Tom Moor
2023-04-07 22:43:34 -04:00
committed by GitHub
parent c202198d61
commit 422bdc32d9
116 changed files with 482 additions and 388 deletions

View File

@@ -1,6 +1,6 @@
import { createGlobalStyle } from "styled-components";
import styledNormalize from "styled-normalize";
import { breakpoints, depths } from ".";
import { breakpoints, depths, s } from ".";
type Props = {
useCursorPointer?: boolean;
@@ -37,7 +37,7 @@ export default createGlobalStyle<Props>`
body {
font-size: 16px;
line-height: 1.5;
color: ${(props) => props.theme.text};
color: ${s("text")};
overscroll-behavior-y: none;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
@@ -102,7 +102,7 @@ export default createGlobalStyle<Props>`
hr {
border: 0;
height: 0;
border-top: 1px solid ${(props) => props.theme.divider};
border-top: 1px solid ${s("divider")};
}
.js-focus-visible :focus:not(.focus-visible) {
@@ -110,7 +110,7 @@ export default createGlobalStyle<Props>`
}
.js-focus-visible .focus-visible {
outline-color: ${(props) => props.theme.accent};
outline-color: ${s("accent")};
outline-offset: -1px;
}
`;