1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-11-29 05:46:00 +03:00

Adjust themes

This commit is contained in:
Brent Jackson 2019-04-20 22:58:36 -04:00
parent 69474bc693
commit a0a5af7dc0
3 changed files with 29 additions and 21 deletions

View File

@ -5,11 +5,8 @@ import Counter from './Counter'
import future from '@mdx-deck/themes/future'
import aspect from '@mdx-deck/themes/aspect'
import { hack } from '@mdx-deck/themes'
export const themes = [
hack,
// future,
future,
aspect,
]

View File

@ -1,6 +1,7 @@
import merge from 'lodash.merge'
import aspect from './aspect'
export default {
...aspect,
aspectRatio: 9 / 16,
}
export default theme =>
merge(theme, aspect(theme), {
aspectRatio: 9 / 16,
})

View File

@ -1,15 +1,25 @@
export default {
aspectRatio: 9 / 16,
css: {
fontSize: '1em',
'@media screen and (min-width:56em)': {
fontSize: 'inherit',
import merge from 'lodash.merge'
export default theme => {
if (theme && theme.css) {
// remove responsive styles from built-in themes
delete theme.css['@media screen and (min-width:56em)']
delete theme.css['@media screen and (min-width:64em)']
}
return merge(theme, {
aspectRatio: 9 / 16,
css: {
fontSize: '1em',
'@media screen and (min-width:56em)': {
fontSize: 'inherit',
},
'@media screen and (min-width:64em)': {
fontSize: 'inherit',
},
'@media print': {
fontSize: 'inherit',
},
},
'@media screen and (min-width:64em)': {
fontSize: 'inherit',
},
'@media print': {
fontSize: 'inherit',
},
},
})
}