Tag: sass

Webpack 2和SASS:一个SASS脚本无法find它的字体依赖关系时,它是@导入到另一个SASS文件

我想利用Webpack 2和Materialise挖掘现代前端开发。 因为我可能会自定义样式,所以我想将Materialise SASS文件导入到我自己的SASS文件中,这样我就可以覆盖东西了。 但是,如果我这样做,Webpack 2无法编译我的SASS文件了,因为它没有findMaterialize字体。 这是我目前的webpack.config.js ,从互联网上复制: const ExtractTextPlugin = require('extract-text-webpack-plugin'); const extractSass = new ExtractTextPlugin({ filename: "style.css", disable: process.env.NODE_ENV === "development" }); module.exports = { entry: './src/js/index.js', output: { path: __dirname + '/public/dist', filename: 'app.js' }, module: { rules: [ { test: /\.scss$/, use: extractSass.extract({ use: [{ loader: "css-loader" }, { loader: "sass-loader" […]

无法从另一个文件夹访问我的.scss软件包文件

我想检索我的.scss文件,其中包含所有其他.scss文件(所有其他.scss文件都导入到styles.scss文件中)。 我把path放到我的angular度cli文件中,文件仍然不可访问(我的html元素没有应用样式) Angular CLI :从我在npm start上运行的文件夹(项目)(从我想访问的文件夹中添加“../webstyles/src/styles.scss”path) "apps": [ { "root": "src", "outDir": "dist", "assets": [ "assets", "favicon.ico", "app/cms/demo.json" ], "index": "index.html", "main": "main.ts", "polyfills": "polyfills.ts", "test": "test.ts", "tsconfig": "tsconfig.app.json", "testTsconfig": "tsconfig.spec.json", "prefix": "cb", "styles": [ "../webstyles/src/styles.scss" ], 我得到的错误是:找不到模块:错误:无法解决该项目中的path…。 对不起,我不能发布文件夹树,但我多次检查,不要以为我在这里犯了一个错误 我有什么select?

共享主机需求/部署工作stream程

我正在评估kunstmaan包 ,它是用symfony(或顶部)构build的cms。 要求是: Node.js的 上海社会科学院 鲍尔 咕噜 UglifyJS UglifyCSS 我的想法是: 这些应用程序只在开发环境中需要吗? 对生产环境有什么要求?

SCSS插值错误,尝试连接一个循环中的variables后的百分比符号

所以这个SCSS代码在我的Macbook上工作正常,但不是我的Ubuntu机器: @each $distance, $color in $range-distances{ @each $track in $tracks { .distance-slider–#{$distance}#{$track}{ background: #{$color}; background-image: linear-gradient(to right, #{$color} #{$distance}%, $grey 0); } } } 我得到以下错误: [Task Failed [scss/_modules/input-range.scss Error: Invalid CSS after "…} #{$distance}%": expected expression (eg 1px, bold), was ", $grey 0);" on line 101 of scss/_modules/input-range.scss >> -gradient(to right, #{$color} #{$distance}%, $grey 0); […]

Grunt不执行grunt-contrib-sass任务

我已经使用grunt-contrib-sass插件将Sass任务添加到了我的grunt进程中。 这是我的gruntfile: module.exports = function ( grunt ) { grunt.loadNpmTasks('grunt-contrib-sass'); /** * Load in our build configuration file. */ var userConfig = require( './build.config.js' ); /** * This is the configuration object Grunt uses to give each plugin its * instructions. */ var taskConfig = { /** * We read in our `package.json` file so […]

如何在angular度应用中使用SASS / SCSS

我正在尝试使用sass在angular2应用程序中构build颜色主题function。 我的header.component.scss文件是: $head-color: #f11; h1{ color: $head-color; } 我已经在根目录中创build了一个文件webpack.common.js,并在其中添加了以下内容: const webpack = require('webpack'); module.exports = { module: { loaders: [ { test: /\.scss$/, exclude: /node_modules/, loaders: ['raw-loader', 'sass-loader'] } ] } }; 我的标题以默认的黑色显示。 但是,如果我将scss文件更改为以下,则显示为红色。 h1{ color: #f11; } 所以基本上我不能给dynamicvariables赋值。 任何人有一些关于这个想法的份额。 TIA

Node-sass includePaths在命令行?

所以我正在build立一个新的项目,我想通过npm使用波旁的scss。 这需要做npm install bourbon ,然后在编译的时候以某种方式将path传送到节点sass。 我目前的sass脚本如下所示: node-sass –output-style compressed -o build/css/ scss/ 波旁文件显示,我需要做一些事情: require("bourbon").includePaths 但是,我怎么通过命令行来做到这一点?

gulp.js – dest.on不是一个函数

我试图编译我的styles.scss与styles.scss gulp-sass当我收到以下错误: [09:48:49] Starting 'e'… [09:48:49] 'e' errored after 2.35 ms [09:48:49] TypeError: dest.on is not a function at DestroyableTransform.Readable.pipe (D:\Data\Web Development\Repositories\ds-www\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:485:8) at Gulp.<anonymous> (D:\Data\Web Development\Repositories\ds-www\gulpfile.js:44:6) at module.exports (D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\lib\runTask.js:34:7) at Gulp.Orchestrator._runTask (D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\index.js:273:3) at Gulp.Orchestrator._runStep (D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\index.js:214:10) at D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\index.js:279:18 at finish (D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\lib\runTask.js:21:8) at module.exports (D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\lib\runTask.js:60:3) at Gulp.Orchestrator._runTask (D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\index.js:273:3) at Gulp.Orchestrator._runStep […]

Node-sass无法findCompass导入

有没有可能使用指南针节点sass? 看来node-sass不知道如何导入Compassfunction。 { "formatted": "Error: File to import not found or unreadable: compass/css3/box- shadow\n Parent style sheet: C:/sandbox/sascar-manager/app/assets/styles/s ass/project/login.scss\n on line 1 of sass/project/login.scss\n>> @import \"compass/css3/box-shadow\";\n ^\n", "message": "File to import not found or unreadable: compass/css3/box-shadow\nP arent style sheet: C:/sandbox/app/app/assets/styles/sass/project/logi n.scss", "column": 1, "line": 1, "file": "C:/sandbox/app/app/assets/styles/sass/project/login.scss", "status": 1 }

csscomb删除soorting组之间的换行符

即时通讯使用csscomb.js来组织我的CSS。 它完美的作品,除了我不想在排队之间的linebreaks [见图] 有没有办法去除这些? 我看着每一个地方。 例 这是mij设置: "remove-empty-rulesets": false, "always-semicolon": true, "color-case": "lower", "block-indent": " ", "color-shorthand": false, "element-case": "lower", "leading-zero": true, "quotes": "single", "sort-order-fallback": "abc", "space-before-colon": "", "space-after-colon": " ", "space-before-combinator": " ", "space-after-combinator": " ", "space-between-declarations": "\n", "space-before-opening-brace": " ", "space-after-opening-brace": "\n", "space-after-selector-delimiter": "\n", "space-before-selector-delimiter": "", "space-before-closing-brace": "\n", "strip-spaces": false, "tab-size": true, "unitless-zero": […]