mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-03 04:21:34 +08:00
fix: add -webkit-text-size-adjust to global style
IOS safari will have error font size if not set.
This commit is contained in:
parent
1994a90a04
commit
5491320f9e
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
-webkit-text-size-adjust: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 639px) {
|
@media only screen and (max-width: 639px) {
|
||||||
|
@ -1,13 +1,20 @@
|
|||||||
import { c } from '../../_utils/cssr'
|
import { c } from '../../_utils/cssr'
|
||||||
import commonVariables from '../common/_common'
|
import commonVariables from '../common/_common'
|
||||||
|
|
||||||
export default c('body', {
|
// All the components need the style
|
||||||
margin: 0,
|
// It is static and won't be changed in the app's lifetime
|
||||||
fontSize: commonVariables.fontSize,
|
// If user want to overrides it `n-global-style` is provided
|
||||||
fontFamily: commonVariables.fontFamily
|
//
|
||||||
}, [
|
// Technically we can remove font-size & font-family to make
|
||||||
c('input', {
|
// it pure. I'm not sure whether to do it.
|
||||||
fontFamily: 'inherit',
|
export default c('body', `
|
||||||
fontSize: 'inherit'
|
margin: 0;
|
||||||
})
|
font-size: ${commonVariables.fontSize};
|
||||||
|
font-family: ${commonVariables.fontFamily};
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
`, [
|
||||||
|
c('input', `
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
`)
|
||||||
])
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user