Skip to content

Commit

Permalink
fix(meta): remove minimal-ui from default viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Nov 16, 2017
1 parent 12afb41 commit cf48b3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ You can optionally override meta using either `manifest` or `meta` section of `n
Meta / Link | Customize With | Default value
---------------------------------------|-----------------------|-------------------
`charset` | `charset` | `utf-8`
`viewport` | `viewport` | `width=device-width, initial-scale=1, minimal-ui`
`viewport` | `viewport` | `width=device-width, initial-scale=1`
`mobile-web-app-capable` | `mobileApp` | `true`
`apple-mobile-web-app-capable` | `mobileAppIOS`* | **`false`**
`apple-mobile-web-app-status-bar-style`| `appleStatusBarStyle`*| `default`
Expand Down
7 changes: 6 additions & 1 deletion packages/meta/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = function nuxtMeta (_options) {
name: process.env.npm_package_name,
description: process.env.npm_package_description,
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1, minimal-ui',
viewport: undefined,
mobileApp: true,
favicon: true,
mobileAppIOS: false,
Expand All @@ -21,6 +21,11 @@ module.exports = function nuxtMeta (_options) {
// Combine sources
const options = Object.assign({}, defaults, this.options.manifest, this.options.meta, _options)

// Default value for viewport
if (options.viewport === undefined) {
options.viewport = 'width=device-width, initial-scale=1'
}

// Charset
if (options.charset && !find(this.options.head.meta, 'charset')) {
this.options.head.meta.push({ charset: options.charset })
Expand Down

0 comments on commit cf48b3f

Please sign in to comment.