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

gini web update 命令中 less转换出现问题 #74

Closed
HuangStomach opened this issue Jan 30, 2019 · 2 comments
Closed

gini web update 命令中 less转换出现问题 #74

HuangStomach opened this issue Jan 30, 2019 · 2 comments

Comments

@HuangStomach
Copy link
Contributor

具体原因详见 less issues#974

我们在引入某些第三方ui框架如bootstrap或自己进行某些计算式height: calc(2.25rem + 2px);的时候

less会将height: calc(2.25rem + 2px);直接转换为height: 4.25rem

根据issue所示,可以通过将class/Gini/Controller/CLI/Web.php55行左右:

$command = sprintf(
    'lessc %s %s %s',
    escapeshellarg($src_path),
    escapeshellarg($dst_path),
    '--clean-css="--s1 --advanced --compatibility=ie8"'
        );
exec($command);

修改为

$command = sprintf(
    'lessc %s %s %s',
    escapeshellarg($src_path),
    escapeshellarg($dst_path),
    '--clean-css="--s1 --advanced --compatibility=ie8" --strict-math=on'
        );
exec($command);

就可以正常的解析,是否考虑增加web update的参数还是直接加入框架中?

@iamfat
Copy link
Owner

iamfat commented Jan 30, 2019 via email

@HuangStomach
Copy link
Contributor Author

#77

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

2 participants