我正在尝试使用基于SASS和COMPASS的jqtouch主题.我有一个文件custom.scss,其中包含最简单的代码,一个导入和一个要覆盖的变量:
@import 'jqtouch';
// Override variables
$base-color: #fe892a;/* The default base which is later used for toolbar, list, and button backgrounds.*/
Run Code Online (Sandbox Code Playgroud)
当我现在将scss文件编译为css时,它基本上只用我的文件名生成jqtouch css.颜色规范无处可见,尽管变量是每个文档(官方指南)和jqtouch.scss文件中的definitley正确,我导入用于costumizing.
我在Windows机器上运行Sass 3.2.9和Compass 0.12.2.
我已经尝试了更多的变量和不同的文件导入,但结果总是,我的覆盖值没有合并.
指南针的ruby配置文件似乎是不可靠的.
有没有人知道过程中出了什么问题,以便忽略我的覆盖值?
我将 VueJS 与框架VuetifyJS (v2.0.19) 一起使用。运行npm run serve后出现此错误:
Sass Loader 已使用与 API 架构不匹配的选项对象进行初始化。
我尝试过的:我删除了node_modules文件夹并将所有 npm 包和 node.js 重新安装/更新到最新的稳定版本。
完整的错误信息:
error in ./node_modules/vuetify/src/components/VRangeSlider/VRangeSlider.sass
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema.
- options has an unknown property 'indentedSyntax'. These properties are valid:
object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? }
at validate (/home/do/Desktop/A/Projects/Ral/AppCLI3/node_modules/sass-loader/node_modules/schema-utils/dist/validate.js:50:11)
at Object.loader (/home/do/Desktop/A/Projects/Ral/AppCLI3/node_modules/sass-loader/dist/index.js:36:28)
@ ./node_modules/vuetify/src/components/VRangeSlider/VRangeSlider.sass 4:14-208 14:3-18:5 …Run Code Online (Sandbox Code Playgroud) 我在使用这行代码时遇到错误
const sass = require('gulp-sass')(require('sass'));
Run Code Online (Sandbox Code Playgroud)
错误输出是:
Requiring external module babel-register
ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and 'C:\xampp-clean\htdocs\myfirsttheme\package.json' contains "type": "module". T
o treat it as a CommonJS script, rename it to use the '.cjs' file extension.
Run Code Online (Sandbox Code Playgroud)
我变了
const sass = require('gulp-sass')(require('sass'));
Run Code Online (Sandbox Code Playgroud)
错误消失了,但我收到此错误:
Requiring external module babel-register
TypeError: Cannot read property 'prod' of undefined
Run Code Online (Sandbox Code Playgroud)
这行导致了错误:
const …Run Code Online (Sandbox Code Playgroud) 正如标题所示我试图检查是否在SASS中定义了一个变量.(如果有任何不同的差异,我正在使用指南针)
我找到了Ruby等价物,它是:
defined? fooRun Code Online (Sandbox Code Playgroud)
在黑暗中给了一枪,但它只是给了我错误:
defined": expected "{", was "?
我找到了一个解决方法(显然只是在所有情况下定义变量,在这种情况下它实际上更有意义)但我真的想知道这是否可能在未来
我尝试安装gulp-sass最新版本,npm i gulp-sass --save-dev 一开始我遇到了很多错误,但后来解决了。但是每当我尝试运行 gulp 时,我都会收到此错误:
Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (88)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1
at module.exports (C:\Users\user\Desktop\HPortf\node_modules\node-sass\lib\binding.js:13:13)
at Object.<anonymous> (C:\Users\user\Desktop\HPortf\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (node:internal/modules/cjs/loader:1083:30)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
at Module.load (node:internal/modules/cjs/loader:948:32)
at Function.Module._load (node:internal/modules/cjs/loader:789:14)
at Module.require (node:internal/modules/cjs/loader:972:19)
at require (node:internal/modules/cjs/helpers:88:18)
at Object.<anonymous> (C:\Users\user\Desktop\HPortf\node_modules\gulp-sass\index.js:166:21)
at Module._compile (node:internal/modules/cjs/loader:1083:30)
Run Code Online (Sandbox Code Playgroud)
我试图解决这个问题,npm rebuild node-sass --force但它也增加了错误。
Error: Node Sass does not yet support …Run Code Online (Sandbox Code Playgroud) 我在安装ruby后尝试安装sass,但是我得到以下错误,请帮我解决这个问题
maradhak@WW730VW7X1688 /c/softwares
$ gem -v
2.2.2
maradhak@WW730VW7X1688 /c/softwares
$ gem install sass
ERROR: Could not find a valid gem 'sass' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
https://rubygems.org/latest_specs.4.8.gz)
Run Code Online (Sandbox Code Playgroud) 我有以下CSS - 我将如何在SASS中描述它?我已经尝试用css2sass反向编译它,并且只是不断收到错误....是我的CSS(工作;-))?
@font-face {
font-family: 'bingo';
src: url("bingo.eot");
src: local('bingo'),
url("bingo.svg#bingo") format('svg'),
url("bingo.otf") format('opentype');
}
Run Code Online (Sandbox Code Playgroud) 我知道这是一个愚蠢的问题,但我一直在搜索谷歌,我找不到任何答案:/那么SASS和指南针,SASS和SCSS之间有什么区别?我真的很困惑.
谢谢你的任何信息:)
我有一个Rails 3.1项目,资产管道工作得很好.问题是我需要在Sass中引用图像,但Rails会计算图像URL.(这在生产中尤其重要,其中Rails将图像的Git哈希附加到其文件名中以填充缓存.)
例如,在app/assets/stylesheets/todos.css.scss:
.button.checkable { background-image: url(/assets/tick.png); }
Run Code Online (Sandbox Code Playgroud)
当我部署(或运行rake assets:precompile)时,文件app/assets/images/tick.png被移动到public/assets/tick-48fe85c0a.png或类似的东西.这打破了CSS.这篇文章提出两点建议:
public/images/并直接引用它们1号肯定是可能的,但这意味着我没有在我的图像上获得缓存破坏.2号因为我正在使用Sass而不是ERB来处理文件.
我:not在SASS mixin中有一个css选择器,但它没有做任何事情:
代码片段:
@mixin dropdown-pos($pos:right) {
&:not(.notip) {
@if $comp-tip == true{
@if $pos == right {
top:$dropdown-width * -0.6;
@include tip($pos:$pos);
}
}
}
&.notip {
@if $pos == right {
top: 0;
left:$dropdown-width * 0.8;
}
}
}
Run Code Online (Sandbox Code Playgroud)
在.notip正在生成的类,但正在为没有生成CSS :not(.notip).
sass ×10
compass-sass ×3
css ×3
gulp ×2
gulp-sass ×2
node.js ×2
npm ×2
ruby ×2
gem ×1
javascript ×1
jqtouch ×1
node-modules ×1
sprockets ×1
vue.js ×1