【问题标题】:SCSS compilation removing -webkit and -ms attributes from the cssSCSS 编译从 css 中删除 -webkit 和 -ms 属性
【发布时间】:2020-08-12 21:28:34
【问题描述】:

我正在尝试对现有的 scss 文件进行一些更改,并使用 compass/CodeKit 对其进行编译。但是在编译所有以“-”开头的样式属性后,都将从生成的 CSS 文件中删除。任何人都可以帮助配置中缺少的内容。

-hr { -webkit-box-sizing: content-box; box-sizing: content-box; height: 0; overflow: visible; }
+hr { box-sizing: content-box; height: 0; overflow: visible; }

-abbr[title], abbr[data-original-title] { text-decoration: underline; -webkit-text-decoration: underline dotted; text-decoration: underline dotted; cursor: help; border-bottom: 0; }
+abbr[title], abbr[data-original-title] { text-decoration: underline; text-decoration: underline dotted; cursor: help; border-bottom: 0; }

-a, area, button, [role="button"], input, label, select, summary, textarea { -ms-touch-action: manipulation; touch-action: manipulation; }
+a, area, button, [role="button"], input, label, select, summary, textarea { touch-action: manipulation; }

我的config.rb 文件如下:

require 'compass/import-once/activate'
# Require any additional compass plugins here.

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "scss"
images_dir = "img"
javascripts_dir = "js"
fonts_dir = "fonts"

output_style = :compact

# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true

line_comments = false
color_output = false

preferred_syntax = :scss

【问题讨论】:

    标签: css sass compiler-errors compass codekit


    【解决方案1】:

    编译器通常有一个清单,其中列出了应该删除哪些特定于浏览器的属性。如果所有主要浏览器都支持某个属性,则不需要供应商特定版本。此外,开发人员使用的一些特定于供应商的属性甚至不存在。

    您在这里添加了特定于供应商的框大小规则,这没有任何意义,因为所有主要浏览器多年来都支持它。

    【讨论】:

      猜你喜欢
      • 2019-07-26
      • 2020-04-11
      • 1970-01-01
      • 2015-04-01
      • 2019-06-15
      • 1970-01-01
      • 2017-12-31
      • 2013-06-14
      • 1970-01-01
      相关资源
      最近更新 更多