Giter Site home page Giter Site logo

Comments (3)

wswmsword avatar wswmsword commented on May 20, 2024

#10 嗯,这个可能是 vite 配置的问题,元素的选择器被 vite 转成了 ._container_16a3w_1,插件生成的媒体查询的选择器还是原来的 .container,vite 没有把插件生成的媒体查询的选择器重命名成 ._container_16a3w_1,这个我再看看。

着急出效果的话可以用下面的配置:

module.exports = {
  plugins: [
    require("postcss-mobile-forever")({
      landscapeWidth: 450,
      maxDisplayWidth: 600,
      disableLandscape: true,
      disableDesktop: true,
      rootSelector: ".root-class",
    }),
  ],
};

这个配置不会生成媒体查询,一样限制最大宽度。

from postcss-mobile-forever.

MaoSkin avatar MaoSkin commented on May 20, 2024

#10 嗯,这个可能是 vite 配置的问题,元素的选择器被 vite 转成了 ._container_16a3w_1,插件生成的媒体查询的选择器还是原来的 .container,vite 没有把插件生成的媒体查询的选择器重命名成 ._container_16a3w_1,这个我再看看。

着急出效果的话可以用下面的配置:

module.exports = {
  plugins: [
    require("postcss-mobile-forever")({
      landscapeWidth: 450,
      maxDisplayWidth: 600,
      disableLandscape: true,
      disableDesktop: true,
      rootSelector: ".root-class",
    }),
  ],
};

这个配置不会生成媒体查询,一样限制最大宽度。

好的,谢谢了

from postcss-mobile-forever.

wswmsword avatar wswmsword commented on May 20, 2024

vitejs/vite-plugin-vue#200

from postcss-mobile-forever.

Related Issues (20)

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.