less

I want to change background color when change screen size at Bootstrap 3

喜夏-厌秋 提交于 2019-12-14 03:07:06
问题 I'm using bootstrap 3. I have a header with transparent red background, but I want to change it according to screen size changes. For example: At lg size, background-color will be red At sm size, background-color will be pink 回答1: You can just use Media Queries /* Large devices (large desktops, 1200px and up) */ @media (min-width: 1200px) { h1 { background: rgba(255, 0, 0, 0.5); /* transparent red */ } } /* Anything Smaller than Large */ @media (max-width: 1199px) { h1 { background: rgba(255,

LESS CSS & Symfony - Updating color schemes dynamically

江枫思渺然 提交于 2019-12-14 02:43:49
问题 I'm working with the Symfony 1.4 and I'm running into a bit of a problem using the LESS CSS preprocessor. Let's say that I have 2 Less files with color specific variables. They are called blue.less and red.less . Here they are: Blue.less @mainBorder: blue; @pulldownBackground: blue; Red.less @mainBorder: red; @pulldownBackground: red; Now let's say that I have a layout.less file that will look something like this: // Colored line under Nav .main { border: 1px solid @mainBorder; .pullDown {

jQuery and LESS, stylesheet update only works once

一笑奈何 提交于 2019-12-14 02:29:07
问题 Attempting to update a custom CSS href, which works fine the first time, but on subsequent updates no changes occur to the page. I can see the href updating in Chrome debugger, so the event is firing, and LESS is not throwing any errors, but the colors don't update the second time around. Here's some of the code (concatenated for readability; note I'm using VS 2010, MVC4, thus less.css extension): <link href="/Content/themes/customizable_default.less.css" id="CustomCSS" rel="stylesheet/less"

Divide a page in 8 perfect fluid columns?

别来无恙 提交于 2019-12-14 02:28:30
问题 So I'm trying to divide a page ( in fact just a footer ) into 8 equal fluid columns ( I was aiming for 6 ), and the only way I thought I could do it is with percentage. I set a percentage of width: 12.5%; to each of the columns ( which are in fact some links set as display: block; float: left; ) and it should have worked, but it didn't. I mean the columns or links should have been equally divided in the page but there's still some space there, about 100px ( my screen has 1366px in width ). So

Linux查看大文件日志

。_饼干妹妹 提交于 2019-12-13 22:42:57
Linux 查看大日志文件 1、使用 less 命令 less filename 但是使用上述命令的坏处是,默认打开的位置在第一行,并且当切换到实时滚动模式(按 F ,实现效果类似 tail -f 效果 )或者想要滚动到最底部的时候(按 G ),会卡在计算行数一段时间。如果卡的时间比较长的话,可以直接按 Ctrl + c ,取消计算行数。 我更推荐打开文件的时候使用 -n :不计算行号(打开大文件的时候很有用)。 less -n file less +G -n file // 打开文件的时候,直接定位到文件的最底部,默认情况下是在首行。 less +F -n file // 打开文件的时候,使用实时滚动模式,Ctrl + c 退出实时滚动模式,按 F 切回实时滚动模式 less + 1000g -n file // 直接定位到第 1000 行,一般你提前通过 grep 命令,定位到行数后,再使用这个命令 less + 50p -n file // 直接定位到 50% 的位置 less + 50P -n file // 直接定位到第 100 字节的位置。这个命令感觉不怎么使用。 不使用 -n 的坏处是:当你使用 = 的时候,会计算出当前光标所在的位置,但是务必记得,大文件计算行数会阻塞一段时间。例如执行下列命令: less copy.log less 命令打开文件后,按下 =

How to enable static files (and less support) when hosting a nodejs app within IIS using IISNode

社会主义新天地 提交于 2019-12-13 21:18:37
问题 Background: Nodejs app using expressjs. Hosted on IIS using IISNode Nodejs app is in virtual directory called /myVirtualDirectory Problem: You want to provide static files or css using less but the url that is passed to nodejs is the full url and doesn't match what would be expected with a standalone nodejs app. 回答1: Solution: var express = require('express'); var app = express(); var lessMiddleware = require('less-middleware'); app.use('/myVirtualDirectory', lessMiddleware({ src: __dirname +

Focused selector in variable . How to do that stuff in LESS like in SCSS

别等时光非礼了梦想. 提交于 2019-12-13 19:46:46
问题 In SCSS i can do so: and then $selector-active: "&:hover, &:focus, &:active"; .class { color: red; #{$selector-active} { color: green; } } And its working. How can i do this in LESS? 回答1: Hmm, interesting. Currently LESS does not expand its "&" within a selector interpolation, i.e. the straight-forward conversion DOES NOT work: @selector-active: &:hover, &:focus, &:active; .class { color: red; @{selector-active} { color: green; } } So you'll need some more tricky code... Using a callback/hook

Is there a plugin to display HTML code inside my web page

允我心安 提交于 2019-12-13 14:30:16
问题 I want to display large chunk of LESS file in my page. I want it to look as nice as possible so that users who see it will read it easily. stackoverflow let me display it (for example) like this: header { color: red; div.myClass { color:blue; } } but is there a plugin to display it nicer? I mean: div will be displayed in blue and class will be displayed in red, variables will be bold etc... Is there some sort of javascript or jQuery library that does it? thanks, Alon 回答1: StackOverflow uses

CSS Framework that automatically handles vendor prefixes?

天大地大妈咪最大 提交于 2019-12-13 13:15:18
问题 I've looked at Blueprint, Less, and SCSS and none of them appear to do what I want. I find this difficult to believe because handling vendor prefixes is the most frustrating part of writing CSS, so it would appear to be to be the first problem anyone who writes a CSS framework ought to address. I want to know, is there a framework (or rails gem) that I can use, that allows me to write border-radius:5px and then let's me assume that it will create a rule with all the proper vendor prefixes?

Less: Passing option when using programmatically (via API)

断了今生、忘了曾经 提交于 2019-12-13 13:15:07
问题 When using lessc on the commandline, I can pass the option --modify-var="my-var=my-val" . How can I pass the same option when I use less programmatically via API with less.render(lessInput, options) ? I would somehow hope that I can set a property in options like {modifyVar:'my-var=my-val'} . But this seems not to work and I didn't find any documentation regarding this use case. Thanks for any help. 回答1: Unfortunately the options are not described at the API documentation. The easiest way to