less

Realtime css/less/scss edition using chrome DevTools in meteor

半世苍凉 提交于 2019-12-08 16:25:03
问题 I want to raise this question again. What was suggested in the answer to this question is to use old fashioned approach: Store css in public folder, and incude it via <link href= Add public folder to google chrome devtools workspace Not a rocket science at all. Works, but two things I don't like with this approach: It's still not native and for production I will have to move files from public folder Each time you edit css, meteor notices changes and reloads application. Author of that answer

Hide content from small and extra small screen size devises

混江龙づ霸主 提交于 2019-12-08 15:58:32
问题 I need to hide some HTML contents from the screen when the devices are changing. That mean I am trying to create a responsive design. In small screen sizes (below 768px) I want to hide some contents. My contents something like this - <div class="content-to-hide"> <div class="container"> <a class="banner-brand visible-sm visible-md visible-lg" href="index.html"> <img src="" alt="" width="280"> </a> <div class="utility-nav"> <ul> <li><a href="#" id="example" data-toggle="tooltip" data-placement

Less CSS performance and implementation

爷,独闯天下 提交于 2019-12-08 15:44:35
问题 What are the best ways to use LESS for CSS. Basically should the Devs write a Less File and then have it compile for production Should I link the LESS code and the javascript file. Or should I skip the LESS rout altogether and just remake the classes I am trying to wrangle together some rather sloppy css and want to get control of it before making major improvements. I think it would be very good to have site wide variable so Less seems like a good thing with the variables and nesting. I am

Well formed CSS to LESS

混江龙づ霸主 提交于 2019-12-08 12:52:46
问题 As a UX designer I am trying to optimize my work flow. I want to go from HTML to well formed CSS to LESS as quick as I can. The idea: Post your HTML, generate CSS, compile TO less, add the properties for style, and THEN recompile to CSS for deployment. HTML: <header> <nav> <ul> <li><a></a></li> <li><a></a></li> <li><a></a></li> </ul> </nav> <header> Outputted CSS using http://lab.xms.pl/css-generator/ header { } header nav { } header nav ul { } header nav ul li { } header nav ul li a { } Then

Conditionally setting one variable's value based on another

拟墨画扇 提交于 2019-12-08 12:44:12
问题 I've got a Less variable called @side . What I want is to set the variable @sideOpposite depending on the value of the @side variable. It can take only two values: "left" or "right". In other words I need a Less equivalent of the JS code: var side = "left", sideOpposite = (side === "left")? "right" : "left"; I've tried to accomplish this using when function, but from what I understand it doesn't work that way and is only applicable to CSS properties, not variables: when (@side = right){

How to declare same style for @media and descendant selector?

*爱你&永不变心* 提交于 2019-12-08 11:59:01
问题 I need to define same style for elements under a media query and descendant by another class. Perfect solution in LESS could be the following [pseudo-code]: .foo { color:red; .example &, @media (min-width:800px) { color:blue; } } that should be desirable that would be compiled into: .foo { color: red; } .example .foo { color: blue; } @media (min-width: 800px) { .foo { color: blue; } } THIS SYNTAX IS INCORRECT but, do you have some suggestion to solve my problem? 回答1: Nope, selectors and

dotless.comple.exe. Why does it stop? what im i doing wrong? Or suggest me and alternative approach

百般思念 提交于 2019-12-08 09:33:27
问题 Im trying to compile my less file to css , im using the dotless I installed it with the nuget . This is the settings I got setup in project "Pre-build event command line" “$(SolutionDir)packages\dotless.1.3.1.0\tool\dotless.compiler.exe” “$(ProjectDir)Content\style.less” “$(ProjectDir)Content\style_less.css” What happends on build is that it just opens the style.less file in notepad and just stops there. When i close the less file, it opens the output css (empty) and same story here it just

Laravel + Elixir: importing bootstrap less error

喜你入骨 提交于 2019-12-08 09:21:18
问题 I've installed bootstrap with bower into /vendor/bower_components folder. Also I have an app.less file with this import: @import '/vendor/bower_components/bootstrap/less/bootstrap'; For the time being it worked, when I run gulp I got public.css compiled and everything went good. However, I've reinstall npm/nvm/gulp/bower and such stuff and after then I got an error when running gulp : [15:19:07] gulp-notify: [Laravel Elixir] Less Compilation Failed!: '/vendor/bower_components/bootstrap/less

Create four color gradient mixin in bootstrap

巧了我就是萌 提交于 2019-12-08 09:18:34
问题 I just wanted to create a two color gradient using bootstrap mixin functions. So my gradient should be like this: when using bootstrap gradient mixin I found there is no any function to match with my requirement. So I tried making my own gradient mixin and added it to bootstrap/less/mixins/grandients.less. But my function didn't do my job.. This is the gradient mixin I added to gradients.less .vertical-custom(@start-color: #ed3537; @start-percent: 0%; @mid-color: #ed3537; @color-stop: 50%;

grunt less multiple css files keeping folder structure

百般思念 提交于 2019-12-08 08:59:52
问题 I have a branding application where I would like to have this output: /branding/ /default/ default.css /brand1/ brand1.css /brand2/ brand2.css This one should be output from a branding folder with same structure but with .less files So I would like to do something like this: less: { production: { options: { }, files: { 'dist/branding/**/*.css': 'branding/**/*.less' } } } I just seen examples on this where they all go to same folder, but I want to keep this dynamic because in my case there is