less

symfony2.3 configure assetic with less

陌路散爱 提交于 2020-01-04 07:04:54
问题 I am using Symfony "2.3.*" and I attempt to make assetic less filter working. I do all of this in the "dev" environment. When I issue the config:dump-reference assetic I get the following output: assetic: debug: %kernel.debug% use_controller: enabled: %kernel.debug% profiler: false read_from: %kernel.root_dir%/../web write_to: %assetic.read_from% java: /usr/bin/java node: /usr/bin/node node_paths: [] ruby: /usr/bin/ruby sass: /usr/bin/sass variables: # Prototype name: [] bundles: # Defaults:

Create LESS source map files with WebEssentials

此生再无相见时 提交于 2020-01-04 02:56:07
问题 According to the WebEssential log LESS souerce maps are supported since Version 1.6 (January 2, 2014) for VS2013 (http://vswebessentials.com/changelog) I have Version 1.9 for VS2013 installed. But source maps are not being generated. What am I missing? Thanks! 回答1: You need to activate the generation of map files in the Web Essential settings. Just open Tools > Options > Web Essentials > LESS in Visual Studio and set Create source map files to true. In addition make sure the web server you

Vue知识点精简汇总

浪子不回头ぞ 提交于 2020-01-04 00:59:17
一、 组件component 1. 什么是组件? 组件(Component)是 Vue.js 最强大的功能之一。组件可以扩展 HTML 元素,封装可重用的代码 组件是自定义元素(对象) 2. 定义组件的方式 方式1:先创建组件构造器,然后由组件构造器创建组件 方式2:直接创建组件 3. 组件的分类 分类:全局组件、局部组件 4. 引用模板 将组件内容放到模板<template>中并引用 5. 动态组件 <component :is="">组件 多个组件使用同一个挂载点,然后动态的在它们之间切换 <keep-alive>组件 二、 组件间数据传递 1. 父子组件 在一个组件内部定义另一个组件,称为父子组件 子组件只能在父组件内部使用 默认情况下,子组件无法访问父组件中的数据,每个组件实例的作用域是独立的 2. 组件间数据传递 (通信) 2.1 子组件访问父组件的数据 a)在调用子组件时,绑定想要获取的父组件中的数据 b)在子组件内部,使用props选项声明获取的数据,即接收来自父组件的数据 总结:父组件通过props向下传递数据给子组件 注:组件中的数据共有三种形式:data、props、computed 2.2 父组件访问子组件的数据 a)在子组件中使用vm.$emit(事件名,数据)触发一个自定义事件,事件名自定义 b)父组件在使用子组件的地方监听子组件触发的事件

Symfony2 Assetic and Less Sourcemaps

时光毁灭记忆、已成空白 提交于 2020-01-03 17:01:52
问题 I am unsure how I can hack the assetic less filter to output a sourcemap file. I am referring to the LessFilter here https://github.com/kriswallsmith/assetic/blob/master/src/Assetic/Filter/LessFilter.php lines 145 and 146 is where the Symfony\Component\Process\Process object is created $proc = $pb->getProcess(); $code = $proc->run(); The trouble is this output gets placed into one single file. I am not sure how to generate a second sourcemap file. How can I extend this filter or hack the

Symfony2 Assetic and Less Sourcemaps

ぃ、小莉子 提交于 2020-01-03 17:01:00
问题 I am unsure how I can hack the assetic less filter to output a sourcemap file. I am referring to the LessFilter here https://github.com/kriswallsmith/assetic/blob/master/src/Assetic/Filter/LessFilter.php lines 145 and 146 is where the Symfony\Component\Process\Process object is created $proc = $pb->getProcess(); $code = $proc->run(); The trouble is this output gets placed into one single file. I am not sure how to generate a second sourcemap file. How can I extend this filter or hack the

How to simplify this LESS CSS Box-shadow mixin? (multiple shadows with “directions”)

…衆ロ難τιáo~ 提交于 2020-01-03 13:37:06
问题 How to reduce this code (probably with a loop ?), to have a "function" which takes direction and number? @dir = the wanted "direction" @number = how many times I need a shadow (here 10 times) @color = color of the shadow Example (working, but not very easy to use) : .perspective-box(@dir, @number, @color) when (@dir = se){ -webkit-box-shadow:1px 1px 0 0 @color, 2px 2px 0 0 @color, 3px 3px 0 0 @color, 4px 4px 0 0 @color, 5px 5px 0 0 @color, 6px 6px 0 0 @color, 7px 7px 0 0 @color, 8px 8px 0 0

Less: how to write :hover and :focus [closed]

安稳与你 提交于 2020-01-03 06:44:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I just started learning Less and would like to have an outcome like this: .navbar .nav > li > a { /* some rules */ } .navbar .nav > li > a:hover { /* some rules */ } .navbar .nav > li > a:focus { /* some rules */ } I can't figure out how to write that in Less. I tried .navbar .nav > li > a { /* some rules */ &

Clear mixin for Less not working using When Guard

此生再无相见时 提交于 2020-01-03 05:56:06
问题 I am trying to create a simple less mixins for clear so I have: .clear { &:after { content: ""; display: table; clear: both; } // :after } .clear(@float) when (@float = "left", @float = "right") { clear: @float; } Basically I want to clear both when I use ".clear" or ".clear(both)" and the second one when I use .clear("left") or ".clear("right"). How can I do this? Thank You, Miguel 回答1: #1 The most straightforward way is to use default mixin guard: .clear(...) when (default()) { &:after {

Convert this CSS to Less

那年仲夏 提交于 2020-01-03 03:12:29
问题 I have the following CSS code and I'd like to convert it to LESS .navbar-nav, .navbar-nav > li, .navbar-nav > li > a { height: 100% !important; } And here is the HTML: <ul class="nav navbar-nav"> <li class="active"><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li class="dropdown"> </li> </ul> What is the correct or the best way to convert the CSS to LESS? 回答1: Option 1 - As Is You can always keep it as it is. Valid CSS is also valid LESS. Option 2 - Parent Nesting with Extending A

LESS docs on guarded mixins — why will this rule not match any mixins?

♀尐吖头ヾ 提交于 2020-01-02 15:02:38
问题 Having primarily used SASS when writing CSS, I am now preparing to try out LESS as well. Having a read through the docs, I'm confused with the following in the context of guarded mixins: Additionally, the keyword true is the only truthy value, making these two mixins equivalent: .truth (@a) when (@a) { ... } .truth (@a) when (@a = true) { ... } Any value other than the keyword true is falsy: .class { .truth(40); // Will not match any of the above definitions. } Why will truth(40) not match