Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit d46a513

Browse files
committed
docs: restore html and body font sizes
1 parent 75e31e7 commit d46a513

File tree

4 files changed

+12
-24
lines changed

4 files changed

+12
-24
lines changed

docs/src/Style.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,3 @@ style.main = {
2727
}
2828

2929
export default style
30-
31-
export const semanticCssOverrides = `
32-
.crossout {
33-
text-decoration: line-through!important;
34-
}
35-
36-
.ui.secondary.inverted.menu a.item.disabled:hover {
37-
color: rgba(255,255,255,.7)!important;
38-
cursor: not-allowed!important;
39-
}
40-
41-
button:-moz-focusring,
42-
[type="button"]:-moz-focusring,
43-
[type="reset"]:-moz-focusring,
44-
[type="submit"]:-moz-focusring {
45-
outline: 0;
46-
}
47-
`

docs/src/app.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@ import * as React from 'react'
22
import { Provider, themes } from '@stardust-ui/react'
33

44
import { mergeThemes } from '../../src/lib'
5-
import { semanticCssOverrides } from './Style'
65
import { ThemeContext } from './context/theme-context'
76
import Router from './routes'
87

9-
const semanticStylesOverrideTheme = {
10-
staticStyles: [semanticCssOverrides],
11-
}
12-
138
interface AppState {
149
themeName: string
1510
changeTheme: (newTheme: string) => void
@@ -34,11 +29,20 @@ class App extends React.Component<any, AppState> {
3429
changeTheme: this.changeTheme,
3530
}
3631
}
32+
3733
render() {
3834
const { themeName } = this.state
3935
return (
4036
<ThemeContext.Provider value={this.state}>
41-
<Provider theme={mergeThemes(semanticStylesOverrideTheme, themes[themeName])}>
37+
<Provider
38+
theme={mergeThemes(themes[themeName], {
39+
// adjust Teams' theme to Semantic UI's font size scheme
40+
siteVariables: {
41+
htmlFontSize: '14px',
42+
bodyFontSize: '1rem',
43+
},
44+
})}
45+
>
4246
<Router />
4347
</Provider>
4448
</ThemeContext.Provider>

src/themes/teams/siteVariables.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export const bodyPadding = 0
9494
export const bodyMargin = 0
9595
export const bodyFontFamily =
9696
'"Segoe UI", "Helvetica Neue", "Apple Color Emoji", "Segoe UI Emoji", Helvetica, Arial, sans-serif'
97+
export const bodyFontSize = '1.4rem'
9798
export const bodyBackground = white
9899
export const bodyColor = black
99100
export const bodyLineHeight = lineHeightBase

src/themes/teams/staticStyles/globalStyles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const globalStyles: StaticStyleFunction = siteVars => ({
88
padding: siteVars.bodyPadding,
99
margin: siteVars.bodyMargin,
1010
fontFamily: siteVars.bodyFontFamily,
11+
fontSize: siteVars.bodyFontSize,
1112
lineHeight: siteVars.bodyLineHeight,
1213
},
1314
})

0 commit comments

Comments
 (0)