1

(已经找到以下所有设置信息真是一团糟:-/)

我可以让 autoprefixer 与 docpad 一起运行,但我(我猜我)没有成功设置browsers值......

我的环境:

  • 文档板 6.69.1
  • IE 11、FF 31.0 + 萤火虫

到目前为止我尝试过的(使用插件安装 docpad :jade,less,livereload,marked):

简单安装工作(默认browsers设置):

  1. docpad install autoprefix

我得到了一些style.css.less文件,其中包含一些导入,尤其是一些background: radial-gradient(...) ; background: linear-gradient(...)规则。

  1. 我将我的重命名style.css.lessstyle.css.autoprefix.css.lessstyle.css.autoprefix.less没用)

直到这里,它只在警告less->csscss->autoprefix转换没有做任何应该没问题的事情的情况下工作。

autoprefixer 在上面添加了一些-webkit...我的...gradient...规则版本。

browsers没有 docpad 手写笔插件就无法设置?

......在我看来......所以我继续这样:

  1. docpad install stylus
  2. 将 autoprefixer stylus 设置添加到我的docpad.coffee设置文件中:

    docpadConfig = {
    
      #...
    
      plugins:
        stylus:
          stylusLibraries:
            'autoprefixer-stylus': true
          options:
            use: [
              #() -> require('autoprefixer-stylus')('ie 6')
              () -> require('autoprefixer-stylus')('ff > 3')
              #() -> require('autoprefixer-stylus')('last 2 versions')
            ]
    }
    
    # Export our DocPad Configuration
    module.exports = docpadConfig
    

效果是,现在 mystyle.css显然又是自动前缀了,但是在上面的选项之间切换没有效果。

如何browsers从这里进行设置?

我从不同来源收集到的所有设置信息,所以我可能错过了一些东西。也许已经可以在没有手写笔插件的情况下配置browsers设置?

这里或多或少帮助我达到这一点的来源:

我的主要测试用例

在我的 css 中手动添加附加-moz-radial-gradient.../规则会显示正确的渐变。-moz-linear-gradient...删除它们不会显示任何渐变(甚至不显示标准语法并且独立于使用自动前缀...这可能是一个无关/遗留问题,因为我希望更复杂的style.css可以更改上述browsers选项至少逐渐改变。)

4

1 回答 1

0

它有效 -问题出在其他地方!

因此,问题已经包含如何设置它的答案......

以下与渐变相关的问题让我检查了我的渐变语法

https://github.com/artpolikarpov/fotorama/issues/91

并遵循规范:http ://www.w3schools.com/css/css3_gradients.asp

更彻底,因为改变

background: linear-gradient( top,         red,  yellow);
background: radial-gradient( top right,   red,  yellow);

background: linear-gradient( to bottom left,                        red,  yellow )
background: radial-gradient( ellipse farthest-corner at top right,  red,  yellow )

它就像一个魅力:-)

于 2014-12-17T21:19:53.063 回答