less

Is it possible to use Icons with css:before without hardcoding the code?

家住魔仙堡 提交于 2019-12-12 19:00:52
问题 I am using the method answered here on StackOverflow to use custom police definition with other classes. This method is summarized below: [class^="icon-"]:before, [class*=" icon-"]:before { font-family: FontAwesome; } .icon-custom:before { content: "\f0c4"; } When I'm using a custom class to use it, I have to use the code generated by the library: i:after { content: '\f0c4'; } In case this code f0c4 change in the library, I would like to avoid reporting the change in every custom class one by

WEBPACK 4 help for less configuration

谁说我不能喝 提交于 2019-12-12 18:36:53
问题 I am trying to understand some trick with webpack. I explain. What i have ? My archi is like : www - css/ - folder/ - some.src.less - other.less - cssOther/ - t.src.less - subFolder/ - t.less My archi is like this. What i want to do is to just compile *.src.less and send them to dist and keep their path and name folder. My actual webpack config. First is it obligatoy needed to use a .js entry ? (i dont need it actually) I am working on it if I found something interesting i will update here

Multiple selectors in loop in LESS

淺唱寂寞╮ 提交于 2019-12-12 15:18:09
问题 I am using the following code to generate a column layout using LESS CSS: .columnBuilder (@index) when (@index =< @columnCount) { .container_@{columnCount} .grid_@{index} { width: unit(((@baseWidth / @columnCount) * @index)-10, px); } .columnBuilder(@index + 1); } Which gives me an output: .container_24 .grid_1 { width: 69px; } .container_24 .grid_2 { width: 148px; } .container_24 .grid_3 { width: 227px; } etc... How would i now create a new less function that would give an output of: .grid_1

Animate-duration is not accurate

巧了我就是萌 提交于 2019-12-12 15:14:21
问题 I created loading spinner in SVG, but animation-duration is not accurate. For example: 30s animation-duration ~ 26s in real 45s animation-duration ~ 38s in real 60s animation-duration ~ 51s in real I'm desperate and I don't know where there may be a mistake. Can you help me? Screen of spinner #1 Screen of spinner #2 - later <svg class="circle"> <circle cx="23" cy="23" r="20"/> </svg> Less: @spinnerSize: 46; svg.spinner { display: block; width: (@spinnerSize + 0px); height: (@spinnerSize + 0px

LESS mixing duplicate properties

℡╲_俬逩灬. 提交于 2019-12-12 15:12:14
问题 When using LESS, i found usefull to mix classes, in order to create a new class based on other class properties, but sometimes i need to override them. like: .btn { border-radius: 10px; background-color: blue; font-size:10px; } .btn_warning { .btn; background-color: yellow; font-size: 12px; } The output has duplicated properties: .btn { border-radius: 10px; background-color: blue; font-size:10px; } .btn_warning { border-radius: 10px; background-color: blue; font-size:10px; background-color:

vs code vue git

感情迁移 提交于 2019-12-12 15:03:57
项目配置 全局打开命令行cmd:vue ui创建一个项目 安装插件vue-cli-plugin-element会自动添加一个运行依赖element-ui 安装开发依赖less-loader 和 less Code中使用git命令 项目中打开Vs Code配置GIT :设置查找git.path,添加键值对 “git.path”: "D://Git//bin//git.exe" "terminal.integrated.shell.windows": "E:\\git\\Git\\bin\\bash.exe" git status 查看,git checkout -b login 创建分支:“login”,git branch 查看分支; 来源: https://www.cnblogs.com/chalkbox/p/12028764.html

red dot in chrome debugger when writing LESS?

浪尽此生 提交于 2019-12-12 14:49:16
问题 I'm transforming my css files into LESS file. only part of my LESS is working well and I see a weird red dot line in the chrome debugger for those problematic lines, any idea what they means? 回答1: http://codemirror.net/doc/releases.html says that Version 2.33 of CodeMirror introduced "Show non-printing characters as red dots." 来源: https://stackoverflow.com/questions/23267505/red-dot-in-chrome-debugger-when-writing-less

Getting an error when running the Less CSS compiler in node.js

心已入冬 提交于 2019-12-12 12:19:56
问题 I have installed node.js, npm, and less node.js version is v0.5.9-pre npm version is 1.0.10 When I run any lessc command I get this error: The "sys" module is now called "util". It should have a similar interface. node.js:203 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead. at Function. (module.js:376:11) at Object. (/var/www/node/npm/node_modules/less/bin/lessc:7:8)

LESS css - JS Parser vs Compiled

冷暖自知 提交于 2019-12-12 11:12:05
问题 I was wondering if anyone knew if the JS interpreter for LESS css causes any noticeable delays in page loading. I would prefer to use the JS parser simply because it's easier to use, since I won't have to run the compiler after every edit and easier to manage the source code as SCM tools won't be tracking both the .less and .css files 回答1: Its not slow on fast computers/browsers. However depending on your target audience I wouldn't use it. I would rather setup lessc to watch a file/directory