Sass

Angular 8/Sass: Find unused css classes

こ雲淡風輕ζ 提交于 2020-05-14 05:28:10
问题 I have an Angular project that uses Angular+Sass, and since the project became pretty big I am constantly finding unused small css classes that need to be removed. I am trying to find a way to remove them all, but for now nothing helped me. I tried purifycss that didn't give me any output or error, ngx-unused-css that I cannot make it work since it has a framework error (path must be string not undefined), and I feel like I am out of options, and the coverage of Chrome that doesn't display

Sass @use not loading partial

 ̄綄美尐妖づ 提交于 2020-05-12 15:35:38
问题 I'm trying to import a sass partial ( _variables.scss ) to use in my main stylesheet ( global.scss ), but I keep getting the Error: Undefined variable. on sass compiling. Directory structure: app └─public └─styles │ global.css (output for sass compiling is here). └─sass └─_variables.scss └─global.scss _variables.scss $font-text: 'lato', sans-serif; global.scss @use '_variables'; body { font-family: $font-text; } Looking at the Sass documentation, I understand to use @use instead of @import

Sass @use not loading partial

|▌冷眼眸甩不掉的悲伤 提交于 2020-05-12 15:30:13
问题 I'm trying to import a sass partial ( _variables.scss ) to use in my main stylesheet ( global.scss ), but I keep getting the Error: Undefined variable. on sass compiling. Directory structure: app └─public └─styles │ global.css (output for sass compiling is here). └─sass └─_variables.scss └─global.scss _variables.scss $font-text: 'lato', sans-serif; global.scss @use '_variables'; body { font-family: $font-text; } Looking at the Sass documentation, I understand to use @use instead of @import

Sass @use not loading partial

不打扰是莪最后的温柔 提交于 2020-05-12 15:29:10
问题 I'm trying to import a sass partial ( _variables.scss ) to use in my main stylesheet ( global.scss ), but I keep getting the Error: Undefined variable. on sass compiling. Directory structure: app └─public └─styles │ global.css (output for sass compiling is here). └─sass └─_variables.scss └─global.scss _variables.scss $font-text: 'lato', sans-serif; global.scss @use '_variables'; body { font-family: $font-text; } Looking at the Sass documentation, I understand to use @use instead of @import

Sass @use not loading partial

喜夏-厌秋 提交于 2020-05-12 15:27:01
问题 I'm trying to import a sass partial ( _variables.scss ) to use in my main stylesheet ( global.scss ), but I keep getting the Error: Undefined variable. on sass compiling. Directory structure: app └─public └─styles │ global.css (output for sass compiling is here). └─sass └─_variables.scss └─global.scss _variables.scss $font-text: 'lato', sans-serif; global.scss @use '_variables'; body { font-family: $font-text; } Looking at the Sass documentation, I understand to use @use instead of @import

How can a browser know the scss files?

夙愿已清 提交于 2020-05-12 12:01:28
问题 I see this html template, and inspect it using Chrome inspection tool. I'm surprised to know that my browser can detect the scss files instead of the compiled css one. Then, I push Ctrl+U to view the page source, try to find 'scss' but it gives nothing in result. So, how does the browser know the scss files? P.S. I'm new to scss/sass/css pre-processor things 回答1: You can read this article for more about Sourcemaps: https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/ This is

sass complie error saying $color: null is not a color even though i declared color

隐身守侯 提交于 2020-05-11 14:58:49
问题 I am new to sass and I wrote some sass code but it is not compiling. $classes : primary secondary success warning danger; $colors : (primary:#007bff,secondary : #6c757d,success: #28a745,warning: #ffc107,dangaer: #dc3545); @each $class in $classes{ .btn-#{$class}{ $currentColor: map-get($colors,#{$class}); background:linear-gradient(to right,$currentColor,lighten($currentColor,10%)); } } The error is : $color: null is not a color. stdin 14:55 root stylesheet on line 14 at column 55 But when I

sass complie error saying $color: null is not a color even though i declared color

瘦欲@ 提交于 2020-05-11 14:57:25
问题 I am new to sass and I wrote some sass code but it is not compiling. $classes : primary secondary success warning danger; $colors : (primary:#007bff,secondary : #6c757d,success: #28a745,warning: #ffc107,dangaer: #dc3545); @each $class in $classes{ .btn-#{$class}{ $currentColor: map-get($colors,#{$class}); background:linear-gradient(to right,$currentColor,lighten($currentColor,10%)); } } The error is : $color: null is not a color. stdin 14:55 root stylesheet on line 14 at column 55 But when I

electron-vue项目打包踩坑指南

此生再无相见时 提交于 2020-05-09 08:16:12
  配置 " build " : { " productName " : " xxxx " , // 项目名 这也是生成的exe文件的前缀名 " appId " : " com.leon.xxxxx " , // 包名 " copyright " : " xxxx " , // 版权 信息 " directories " : { // 输出文件夹 " output " : " build " }, " nsis " : { " oneClick " : false , // 是否一键安装 " allowElevation " : true , // 允许请求提升。 如果为false,则用户必须使用提升的权限重新启动安装程序。 " allowToChangeInstallationDirectory " : true , // 允许修改安装目录 " installerIcon " : " ./build/icons/aaa.ico " , // 安装图标 " uninstallerIcon " : " ./build/icons/bbb.ico " , // 卸载图标 " installerHeaderIcon " : " ./build/icons/aaa.ico " , // 安装时头部图标 " createDesktopShortcut " : true , // 创建桌面图标

vue入坑教程(二)在vue项目中如何导入element以及sass

戏子无情 提交于 2020-05-09 07:06:55
在项目中导入element以及sass、stylus等方便开发的工具以及UI框架 (1)如何在vue项目中导入elementUI框架   elementUI是饿了么团队开发出来基于vue的前端UI框架,其底层原理和bookstrap相似   安装 npm install element-ui -S   在package.json中检查是否已经装上element   在main.js中: import ElementUI from 'element-ui'         import 'element-ui/lib/theme-chalk/index.css'         Vue.use(ElementUI) (2)如何在vue项目中使用sass预编译    安装sass:npm install --save -dev sass -loader         //sass-loader依赖于node-sass        npm install --save -dev node -sass    配置:在build文件夹下的webpack.base.conf.js的rules里面添加配置        {           test: /\.sass$/,          loaders: [ 'style', 'css', 'sass']        }