Skip to content

Commit 824f89e

Browse files
authored
feat(opentrons-ai-client): remove GlobalStyle with styled-components (#18901)
* feat(opentrons-ai-client): remove GlobalStyle with styled-components
1 parent 8cdf1db commit 824f89e

File tree

4 files changed

+35
-39
lines changed

4 files changed

+35
-39
lines changed

components/src/styles/global.module.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,4 +176,7 @@
176176
--purple-35: var(--purple-35-touchscreen);
177177
--purple-30: var(--purple-30-touchscreen);
178178
--purple-20: var(--purple-20-touchscreen);
179+
180+
/* font-family */
181+
--font-family-main: 'Public Sans';
179182
}

opentrons-ai-client/src/atoms/GlobalStyle/index.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

opentrons-ai-client/src/global.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* from createGlobalStyle */
2+
* {
3+
box-sizing: border-box;
4+
margin: 0;
5+
padding: 0;
6+
font-family: var(--font-family-main), 'DejaVu Sans', sans-serif;
7+
}
8+
9+
html,
10+
body {
11+
width: 100%;
12+
height: 100%;
13+
color: var(--black-90);
14+
}
15+
16+
a {
17+
text-decoration: none;
18+
}
19+
20+
button {
21+
border: none;
22+
}
23+
24+
button:focus,
25+
button:active {
26+
outline: 0;
27+
}

opentrons-ai-client/src/main.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { I18nextProvider } from 'react-i18next'
44
import { Auth0Provider } from '@auth0/auth0-react'
55

66
import { App } from './App'
7-
import { GlobalStyle } from './atoms/GlobalStyle'
87
import { i18n } from './i18n'
98
import {
109
AUTH0_DOMAIN,
@@ -14,6 +13,11 @@ import {
1413
STAGING_AUTH0_CLIENT_ID,
1514
} from './resources/constants'
1615

16+
import '@fontsource/public-sans'
17+
import '@fontsource/public-sans/600.css'
18+
import '@fontsource/public-sans/700.css'
19+
import './global.css'
20+
1721
const rootElement = document.getElementById('root')
1822

1923
const getClientId = (): string => {
@@ -46,7 +50,6 @@ if (rootElement != null) {
4650
redirect_uri: window.location.origin,
4751
}}
4852
>
49-
<GlobalStyle />
5053
<I18nextProvider i18n={i18n}>
5154
<App />
5255
</I18nextProvider>

0 commit comments

Comments
 (0)