Code Monkey home page Code Monkey logo

Comments (6)

yolofit avatar yolofit commented on June 1, 2024

调整下postcss顺序.
貌似是受cssnano影响.
"postcss": {
"plugins": {
"autoprefixer": {},
"postcss-adaptive": {
"autoRem": true
},
"postcss-aspect-ratio-mini": {},
"cssnano": {
"autoprefixer": false,
"postcss-zindex": false
}

}

},

from postcss-aspect-ratio-mini.

w550 avatar w550 commented on June 1, 2024
module.exports = {
  plugins: {
    // autoprefixer: {},
    
    "postcss-write-svg": {
      utf8: false
    },
    "postcss-cssnext": {},
    "postcss-px-to-viewport": {
      viewportWidth: 750,     // (Number) The width of the viewport.
      viewportHeight: 1334,    // (Number) The height of the viewport.
      unitPrecision: 3,       // (Number) The decimal numbers to allow the REM units to grow to.
      viewportUnit: 'vw',     // (String) Expected units.
      selectorBlackList: ['.ignore', '.hairlines'],  // (Array) The selectors to ignore and leave as px.
      minPixelValue: 1,       // (Number) Set the minimum pixel value to replace.
      mediaQuery: false       // (Boolean) Allow px to be converted in media queries.
    },
    "postcss-viewport-units": {},
    "postcss-aspect-ratio-mini": {},
    "cssnano": {
      preset: "advanced",
      autoprefixer: false,
      "postcss-zindex": false
    }
  }
}
{
  "name": "video",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "cssnano": "^4.0.5",
    "postcss-aspect-ratio-mini": "^0.0.2",
    "postcss-cssnext": "^3.1.0",
    "postcss-px-to-viewport": "^0.0.3",
    "postcss-viewport-units": "^0.1.4",
    "postcss-write-svg": "^3.0.1",
    "register-service-worker": "^1.0.0",
    "vue": "^2.5.17"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.0.1",
    "@vue/cli-plugin-eslint": "^3.0.1",
    "@vue/cli-plugin-pwa": "^3.0.1",
    "@vue/cli-service": "^3.0.1",
    "cssnano-preset-advanced": "^4.0.0",
    "node-sass": "^4.9.0",
    "sass-loader": "^7.0.1",
    "vue-template-compiler": "^2.5.17"
  }
}

调整顺序了。
没用。。
@yolofit

from postcss-aspect-ratio-mini.

w550 avatar w550 commented on June 1, 2024

@yisibl
找到原因了。

 aspect-ratio: '350:196';
aspect-ratio: "350:196";

这里写单引号,生成的就是单引号。
写双引号,生成的就是双引号

from postcss-aspect-ratio-mini.

yisibl avatar yisibl commented on June 1, 2024

好的,我先关闭了。

from postcss-aspect-ratio-mini.

dream2023 avatar dream2023 commented on June 1, 2024

@yisibl
找到原因了。

 aspect-ratio: '350:196';
aspect-ratio: "350:196";

这里写单引号,生成的就是单引号。
写双引号,生成的就是双引号

我的编辑器默认补全为双引号,怎么办,是不是单引号就没问题了?

from postcss-aspect-ratio-mini.

dream2023 avatar dream2023 commented on June 1, 2024

好的,我先关闭了。

大神,能不能在双引号的情况下,编译出来的没单引号

from postcss-aspect-ratio-mini.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.