less

使用gulp构建前端(二)

久未见 提交于 2019-12-04 17:18:20
使用gulp构建前端(二) 在使用gulp构建前端(一)文章中已经搭建了整个gulp的使用环境,现在我们来开始使用一些简单的插件的进行整个项目的编译过程。 插件一 使用gulp-imagemin压缩图片文件(包括PNG、JPEG、GIF和SVG图片) 还是进入项目目录本地安装gulp-imagemin npm install gulp-imagemin --save-dev 查看package.json文件是否添加了依赖,熟练过后就不用查看了,排查错误的时候可以这样。 { "name": "chen", "version": "1.0.0", "description": "", "main": "build/index.html", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "chen", "license": "ISC", "devDependencies": { "gulp": "^3.9.1", "gulp-imagemin": "^3.0.1" } } 开始在gulpfile.js文件中开始编写 var gulp = require('gulp'), //本地安装gulp所用到的地方 imagemin = require('gulp-imagemin');

How to use stylus block level import with Vuetify styles

隐身守侯 提交于 2019-12-04 17:08:52
Using a stylus block level import: # vuetify-style.styl .myapp @import '~vuetify/src/stylus/main' This is to ensure that the vuetify css doesn't interfere with elements from other parts of the page which aren't using vuetify. But unfortunately it doesn't work, I can't compile it. ERROR Failed to compile with 1 errors 2:13:28 pm error in ./src/stylus/main.styl Module build failed (from ./node_modules/stylus-loader/index.js): Error: node_modules/vuetify/src/stylus/settings/_el evations.styl:85:33 81| 0px 9px 46px 8px $shadow-key-ambient-opacity 82| 83| // MIXINS 84| elevation($z, important =

Compiling custom Bootstrap css in yii2 from less

那年仲夏 提交于 2019-12-04 16:50:32
I'm starting a new project in Yii2 and Composer (after a few projects with YII 1). I created a new "advanced project" with composer. Everything is okay but, I'm wondering what is the best way to customize the bootstrap theme? I think copying the whole bootstrap less to the backend and to the frontend and edit the two variables file and compile it isn't the right way. So: is it somehow possible to extend the less files downloaded by the composer and edit only the two variables file? Bootstrap configuration can be done by changing variables.less. The following BootstrapAsset is the replacement

LESS extend() not working

半腔热情 提交于 2019-12-04 16:25:49
I want to write a class 'selected' for my app's buttons. When a button hasClass 'selected' its look and feel should be the same as Bootstrap's 'btn-primary'. Bootstrap css defines (for example): .btn-primary { background-color:#00F; color:#FFF; } I wrote my class as follows: button.selected:extend(.btn-primary) {}; 1) Is it supposed to work like that? 2) If 1) is yes, then my css is not working. The selected class does not inherit color and background-color from btn-primary. UPDATE Some of my markup: <div class="filters"> <div class="btn-group btn-group-lg type"> <button type="button" class=

How to install and run lessc on top of node.js and Windows?

亡梦爱人 提交于 2019-12-04 16:18:21
问题 Hi I am learning LESS and I would like to install lessc on my Windows 7. Following this tutorial http://verekia.com/less-css/dont-read-less-css-tutorial-highly-addictive The first step is I dowloaded and installed node.js (node-v0.10.5-x64.msi). Then in a console, I ran npm install less -g I got the following: npm http GET https://registry.npmjs.org/less npm http 304 https://registry.npmjs.org/less npm http GET https://registry.npmjs.org/ycssmin npm http 304 https://registry.npmjs.org/ycssmin

visual studio 2019不能在vue文件中直接识别less语法

久未见 提交于 2019-12-04 15:24:08
试了好多方法,不象vs code那样能直接在template vue文件中就识别less语法 下边这种分离的方式是可以的,在项目中也比较实用,将来你代码量大了,样式/脚本也还是要和template代码分开的 亲测scoped有效,lang='less'不能省,需要装less-loader,在cli创建的时候把less dev dependence选上 <template>html codes ...</template> <script src="./resource/HelloWorld.js"></script> <style src="./resource/HelloWorld.less" lang="less" scoped></style> 感谢 疯癫释流年 的分享 https://www.cnblogs.com/wy120/p/10179901.html 来源: https://www.cnblogs.com/laozuan/p/11871437.html

variable @fontAwesomeEotPath_iefix is undefined

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 15:16:44
问题 I'm working on my first project with bootstrap and I get this error whenever I try and view my project. I've looked around and haven't been able to find someone with same problem. Any help would be great! Thanks in advance. Less::ParseError in Search#index Showing /Users/Basil/Dropbox/College/CS 50/playedby.me/app/views/layouts/application.html.erb where line #4 raised: variable @fontAwesomeEotPath_iefix is undefined (in /Users/Basil/Dropbox/College/CS 50/playedby.me/app/assets/stylesheets

LESS - Nesting generates bad CSS code? [closed]

帅比萌擦擦* 提交于 2019-12-04 15:08:57
In the following article I read that one should try reduce the number of selecetors. Article: use less selectors I'm wondering if writing LESS and I'm using a lot of nesting to group parent and child elements, will that generate bad CSS code in the end? LESS .wrap{ width: 100%; height: 20%; background: green; header{ background: blue; h1{ color: red; } } } I'm using a lot of nesting to group parent and child elements, will that generate bad CSS code in the end? In a word, yes. In the long run this will give you highly specific, unmaintainable CSS. Let 's have a look at what your example will

Netbeans 7.4 - exclude LESS partial source files from compiling to css

China☆狼群 提交于 2019-12-04 14:47:11
This is mostly a nuisance problem (creating clutter in my css directory). I want to know if, in Netbeans 7.4 (or 8.0 beta?), there is any way to tag a LESS file to no be compiled on run/save. I have a library.less and vars.less file that are .mixins and @variables that get used site-wide in several other less files as includes but don't need to be compiled themselves as they produce effectively empty CSS. I'd like Netbeans OR lessc.cmd to ignore them if possible. Is it something that can be done? According to the test suite , editing and saving a partial should trigger a recompile for the

Lighten color from parent in Less

纵然是瞬间 提交于 2019-12-04 14:22:56
问题 I am starting out with Less and one of the reasons I wanted to is because of the ligthen() function. So my first attempt was to do something with that. This is my HTML <div class="box blue"> <div class="boxbar">Foo</div> blue </div> I finally got it working, but I doubt it's supposed be like this: @blue: #468ACE; @green: #41A53D; @red: #9C2525; @purple: #8938BF; div { padding: 10px; } .blue { background-color: @blue; .boxbar { background-color: lighten(@blue, 10%); } } .green { background