GithubHelp home page GithubHelp logo

如何让maxDisplayWidth只针对某个class或者某个页面,而不是一设置上来就是限制全局 about postcss-mobile-forever HOT 13 OPEN

hzzou avatar hzzou commented on May 26, 2024
如何让maxDisplayWidth只针对某个class或者某个页面,而不是一设置上来就是限制全局

from postcss-mobile-forever.

Comments (13)

wswmsword avatar wswmsword commented on May 26, 2024

可以设置 include 选项,用正则过滤一下,设置之后只有匹配的页面会用 maxDisplayWidth 转换,其他页面不走插件。

from postcss-mobile-forever.

hzzou avatar hzzou commented on May 26, 2024

可以设置 include 选项,用正则过滤一下,设置之后只有匹配的页面会用 maxDisplayWidth 转换,其他页面不走插件。

不行,我设置过,include或者exclude选项不生效

"postcss-mobile-forever":{
            viewportWidth: 1920,
            maxDisplayWidth: 1920,
            include: [/views\/airdrop/]
        },

一设置就是全局

from postcss-mobile-forever.

wswmsword avatar wswmsword commented on May 26, 2024

你的系统是 Windows 吗,Windows 路径分隔符号和 Mac 不同。

from postcss-mobile-forever.

hzzou avatar hzzou commented on May 26, 2024

你的系统是 Windows 吗,Windows 路径分隔符号和 Mac 不同。

我是在mac上开发

from postcss-mobile-forever.

wswmsword avatar wswmsword commented on May 26, 2024

方便的话给我个最简包,我本地调试一下。按理 include 是能生效的,我这两天刚写了个例子就是只生效 include 内的文件,https://github.com/wswmsword/postcss-mobile-forever/tree/main/example/cases/include-only

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.