less

Gulp: how to get gulp result as variable

匆匆过客 提交于 2020-01-02 09:39:07
问题 Needed something like this: gulp.src(path.join(conf.paths.src, '/**/*.less')) .pipe($.less()) // already have some result, but HUGE changes are needed .pipe(HERE_I_GET_IT_AS_A_TEXT(function(str){ // a lot of different changes return changed_str; })) .pipe(rename('styles.css')) // go on doing smth with changed_str .pipe(gulp.dest('./app/theme/')); Is there something in gulp to get some transitional result as text, process text with js and pass it to the next pipes? Everywhere I find only

Webpack 2 issues with Semantic UI

孤者浪人 提交于 2020-01-02 07:19:27
问题 Been struggling to get semantic-ui setup using Webpack 2. I a few errors relating to the fonts in the default semantic-ui theme and another error regarding image-webpack-loader : ERROR in ./~/css-loader?{"lessPlugins":[{"options":{"paths":{"../../theme.config":"/Users/djthomps/Desktop/demo/theme.config"}}}]}!./~/less-loader!./semantic/src/semantic.less Module not found: Error: Can't resolve './themes/themes/default/assets/fonts/icons.eot' in '/Users/djthomps/Desktop/demo/semantic/src' @ ./~

LESS: darken() on current color

梦想与她 提交于 2020-01-02 05:28:09
问题 I want to call LESS's darken() function on whatever the current color is (I don't have the current color in any variable). Is that possible? 回答1: as per seven-phases-max request; in your node backend let say express var less = require('less'); //also the body parser, express, etc .... from your page you make an asynchronous request with the actual color of your page, just grabbing it with js and making the request. then in express: app.post('/whateveryourroute', function(req, res) { var

less css using last-child selector

南笙酒味 提交于 2020-01-02 01:02:42
问题 I am using less and trying to get the last input to have a margin-bottom of 10px . Here is what I have, but it is not working, and not applying the margin-bottom on the last input. Any ideas why? input { margin-bottom: 0px; &:last-child { margin-bottom: 10px; } } And the HTML <form id="auth-form"> <input id="ember367" class="ember-view ember-text-field" placeholder="Email" type="email" name="email"> <input id="ember368" class="ember-view ember-text-field" placeholder="Password" type="password

Intellij IDEA 11: how can I compile .css from .less?

给你一囗甜甜゛ 提交于 2020-01-01 04:16:11
问题 how can I compile .css from .less in intellij ? sure this should be dead easy, but its got me stumped. anyone know how to do this? 回答1: IntelliJ IDEA relies on web frameworks and third-party deployment tools to perform this task. There is a feature request to perform such compilation internally, feel free to vote. 回答2: I wrote a LESS Compiler plugin that automatically compiles LESS files to CSS whenever they change. You can configure multiple LESS directories to watch per project, and the

How to use Less in a rails 3.1 application?

我的梦境 提交于 2019-12-31 22:27:21
问题 What is the easiest (is there an easy way?) to use Less (in combination with Sass/Scss) in the rails 3.1 assets pipeline? I want to load a file like foo.css.less like i would do for bar.css.scss I found some wonky solution that does not work for me (haven't tried a lot) : https://github.com/thisduck/ruby-less-js/issues/2 The idea would be to use Twitter Bootstrap in a clean way. Thanks in advance 回答1: If you only want to use bootstrap, you can do it by including the 'less-rails' and 'less

On the fly LESS compiler for java web app?

你说的曾经没有我的故事 提交于 2019-12-31 12:58:27
问题 I am looking for a way to compile CSS LESS files on the server side on demand during development. For example if the browser makes a request to /assets/css/foo.css I want the server to notice that there is an /assets/css/foo.less file and then to have this file complied and the resulting css returned. I am guessing there must be a LESS servlet somewhere that can do this? I am running tomcat 7 with Spring MVC application How do I configure a Java Web App to do on the fly LESS compilation? 回答1:

On the fly LESS compiler for java web app?

拥有回忆 提交于 2019-12-31 12:57:43
问题 I am looking for a way to compile CSS LESS files on the server side on demand during development. For example if the browser makes a request to /assets/css/foo.css I want the server to notice that there is an /assets/css/foo.less file and then to have this file complied and the resulting css returned. I am guessing there must be a LESS servlet somewhere that can do this? I am running tomcat 7 with Spring MVC application How do I configure a Java Web App to do on the fly LESS compilation? 回答1:

Use table row coloring for cells in Bootstrap

夙愿已清 提交于 2019-12-31 11:37:51
问题 Twitter Bootstrap offers classes to color table rows like so: <tr class="success"> I like the color choice and the class naming. Now what I would like to do, is to re-use these classes and apply them on table cells, too. Obviously, I could define my own classes with the same colors and be done with it. But is there a shorthand in CSS. LESS, to let the td inherit the classes? 回答1: You can override the default css rules with this: .table tbody tr > td.success { background-color: #dff0d8

Remove LESS // comments on compile

北城以北 提交于 2019-12-31 10:30:08
问题 Is it possible to configure LESS to remove "// comments" when it compiles via JS? I want to remove them from the outputted less file. 回答1: Less' single-line comments // are supposed to be silent, as per documentation states: Single-line comments are also valid in LESS, but they are ‘silent’, they don’t show up in the compiled CSS output: // Hi, I'm a silent comment, I won't show up in your CSS .class { color: white } See at LESS' website: http://lesscss.org/#-comments -x flag works on command