Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

less的使用mixin语法报错 #3335

Closed
sanmmm opened this issue Jan 9, 2019 · 2 comments
Closed

less的使用mixin语法报错 #3335

sanmmm opened this issue Jan 9, 2019 · 2 comments

Comments

@sanmmm
Copy link

sanmmm commented Jan 9, 2019

.a {
}

.b {
    .a();
}

编译报错 .a is not undefined

@afc163

This comment has been minimized.

@sanmmm sanmmm closed this as completed Jan 10, 2019
@hughfenghen
Copy link

hughfenghen commented Mar 13, 2019

不带括号是less官方支持的语法,而且带或者不带括号输出的css有所不同。
less mixin
image

我找到的原因是这一块导致的。

config.plugin('ant-design-theme').use(AntDesignThemePlugin, [
      {
        antDir: path.join(__dirname, '../node_modules/antd'),
        stylesDir,
        varFile: path.join(__dirname, '../node_modules/antd/lib/style/themes/default.less'),
        mainLessFile: outFile, //     themeVariables: ['@primary-color'],
        indexFileName: 'index.html',
        generateOne: true,
        lessUrl: 'https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js',
      },
    ]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants