less

LESS: Can you group a CSS selector with a media query?

拥有回忆 提交于 2019-12-01 05:18:30
问题 I really enjoyed finding out you could create a media query variable that you can easily reuse and makes your code much more readable. @tablet: ~"(min-width: 768px) and (max-width: 980px)"; @media @tablet { ... } I want to know if it's possible to group a media query with a selector. It doesn't appear to work the way I've implemented it, but I thought I'd ask to see if it's even probable. @tablet: ~"(min-width: 768px) and (max-width: 980px)"; body { aside { ... } &.homepage, @media @tablet {

Double ampersand in LESS

筅森魡賤 提交于 2019-12-01 05:16:42
问题 I'm confused about double ampersand behaviour in LESS compiler. Look: .heading { &&--type-small { font-size: 15px; } } Will be compiled to: .heading.heading--type-small { font-size: 15px; } And thats good. But. .wrapper { .heading { &&--type-small { font-size: 15px; } } } Will produce: .wrapper .heading.wrapper .heading--type-small { font-size: 15px; } It looks weird. No? Is there any advice to make this code works like: .wrapper .heading.heading--type-small { font-size: 15px; } Thanks =) 回答1

How to correctly execute lessc-rhino-1.6.3.js from command line

折月煮酒 提交于 2019-12-01 05:01:00
I'm trying "latest and greatest" LESS version and it seems it does not work in rhino command-line version. I've done following Took latest rhino from here https://github.com/downloads/mozilla/rhino/rhino1_7R4.zip Took latest less-rhino-1.6.3.js from here https://github.com/less/less.js/tree/master/dist Running following from command line java -jar js.jar less-rhino-1.6.3.js text.less text.css or java -jar js.jar less-rhino-1.6.3.js lessc-rhino-1.6.3.js text.less text.css The result is - "silently nothing". When trying to run 'previous latest version' - it runs OK without problems java -jar js

Nodejs: How to catch an exception from middleware?

做~自己de王妃 提交于 2019-12-01 04:00:14
问题 I'm using node.js and the "less" compiler middleware: app.configure(function() { // ... app.use(express.compiler({ src: __dirname + '/public', enable: ['less'] })) // ... }) Now i've got a faulty .less -file, but I can't find any docs on how to get the error message. The page I receive is this: <html> <head> <title>[object Object]</title> <style> /* css stuff */ </style> </head> <body> <div id="wrapper"> <h1>Connect</h1> <h2><em>500</em> [object Object]</h2> <ul id="stacktrace"></ul> </div> <

Gulp Error: watch ENOSPC

浪尽此生 提交于 2019-12-01 04:00:14
Hi i'm getting this error while running gulp watch. im using vueify in laravel project. why is this happening. it was working fine all these days and this came in today. $ gulp watch [12:56:01] Using gulpfile ~/Documents/web_projects/next-home/gulpfile.js [12:56:01] Starting 'watch'... [12:56:01] Starting 'browserify'... Fetching Browserify Source Files... - resources/assets/js/app.js Saving To... - public/js/app.js [12:56:02] Finished 'browserify' after 707 ms [12:56:02] 'watch' errored after 722 ms [12:56:02] Error: watch /home/bazi/Documents/web_projects/next-home/resources/assets/less/

Import LESS file only for one page

≡放荡痞女 提交于 2019-12-01 03:35:49
问题 I have main all.less file, where I'm including all other less files e.g. @import "scaffolding.less"; @import "type.less"; @import "code.less"; @import "grid.less"; @import "homepage.less"; So my question is. Is it possible to get "homepage.less" only in homepage (importing it in all.less ). Please Note that I don't want to attach it directly in the html file. Thanks 回答1: On your homepage use: <body class="homepage"> And then in your Less files: .homepage { @import "homepage.less"; } The above

Resource interpreted as Script but transferred with MIME type text/x-c++

风格不统一 提交于 2019-12-01 03:26:24
问题 LESS beginner. Wrote a test html below <head> <link rel="stylesheet" type="text/css" href="404.less"> <script src="http://lesscss.googlecode.com/files/less-1.3.0.min.js" type="text/javascript"></script> </head> <body>test</body> But got a warning in Chrome Resource interpreted as Script but transferred with MIME type text/x-c++: "http://lesscss.googlecode.com/files/less-1.3.0.min.js". Why? 回答1: You probably want your link tag to say: <link rel="stylesheet/less" type="text/css" href="404.less"

Why vundle requires filetype off

耗尽温柔 提交于 2019-12-01 02:43:12
On vundle's homepage, it documented that it requires filetype to be off in .vimrc: filetype off " required! set rtp+=~/.vim/bundle/vundle/ call vundle#rc() I don't understand why. Since I am encountering problems with editing .coffee and .less files recently after separately-installed related plugins for them (vim-coffee-script and vim-less). My issue on vim-coffee-script Maxim Kim You can set filetype on after the last Vundle command: filetype off " required! set rtp+=~/.vim/bundle/vundle/ call vundle#rc() ... Vundle 'blabla' Vundle 'blabla2' filetype plugin indent on " re-enable filetype I

less使用

南楼画角 提交于 2019-12-01 02:16:48
/------------------------------------- ├ 布局 ┆ └------------------------------------/ // 盒子宽高 .size(@w, @h) { width: @w; height: @h; } // 最小尺寸, 兼容IE6 .min-width(@min-w) { min-width: @min-w; _width: @min-w; } .min-height(@min-h) { min-height: @min-h; _height: @min-h; } // 内联块级元素, 兼容IE6 .dib() { display: inline-block; *display: inline; *zoom: 1; } // 固定定位, 兼容IE6 .fixed() { position: fixed; _position: absolute; *zoom: 1; } // 统一盒模型 .border-box() { *, *:after, *:before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } } // 文字图片居中 .center(text-x) { text-align:

How to correctly execute lessc-rhino-1.6.3.js from command line

与世无争的帅哥 提交于 2019-12-01 02:12:16
问题 I'm trying "latest and greatest" LESS version and it seems it does not work in rhino command-line version. I've done following Took latest rhino from here https://github.com/downloads/mozilla/rhino/rhino1_7R4.zip Took latest less-rhino-1.6.3.js from here https://github.com/less/less.js/tree/master/dist Running following from command line java -jar js.jar less-rhino-1.6.3.js text.less text.css or java -jar js.jar less-rhino-1.6.3.js lessc-rhino-1.6.3.js text.less text.css The result is -