less

LESS extend() not working

自闭症网瘾萝莉.ら 提交于 2019-12-13 12:13:00
问题 I want to write a class 'selected' for my app's buttons. When a button hasClass 'selected' its look and feel should be the same as Bootstrap's 'btn-primary'. Bootstrap css defines (for example): .btn-primary { background-color:#00F; color:#FFF; } I wrote my class as follows: button.selected:extend(.btn-primary) {}; 1) Is it supposed to work like that? 2) If 1) is yes, then my css is not working. The selected class does not inherit color and background-color from btn-primary. UPDATE Some of my

Manipulating CSS on Iframe

*爱你&永不变心* 提交于 2019-12-13 09:26:54
问题 I have Iframe embed external website to my website but my text, button and content is very large. Image of my content: The content's code: <div class="row-container"> <div class="poker_content" [ngClass]="{'not-opened': iframeUrl === null}"> <iframe [src]="iframeUrl | safe" *ngIf="showIframe"></iframe> </div> </div> How can I manipulate the content? 回答1: Styling the contents of an iframe is just like styling any other web page. But, you must have access to edit the page. If you can't edit the

how to use less mixins file in my code?

南笙酒味 提交于 2019-12-13 08:40:05
问题 here is my code var parser = window.less.Parser(); try{ parser.parse(aztp_css_editor.getValue(), function(error, result){ if(!error){ alert(result.toCSS()); }else{ alert(error); } }); }catch(error){ alert(error); } I have a mixins less file here http://lessprefixer.com/ for shorthand css3 prefix, how I setup it into my parse less code? 回答1: I think you should better the less.render function, see also: http://lesscss.org/usage/#programmatic-usage. But indeed you can use the @import directive

select first element of the same class

家住魔仙堡 提交于 2019-12-13 08:35:27
问题 How to access first of many grouped element of the same class? Lets say i have something that looks like this: <div class="group"> <div class="element"></div> <div class="element"></div> <div class="element"></div> <div class="element"></div> </div> <div class="group"> <div class="element"></div> <div class="element"></div> <div class="element"></div> <div class="element"></div> </div> <div class="group"> <div class="element"></div> <div class="element"></div> <div class="element"></div> <div

less详解

拜拜、爱过 提交于 2019-12-13 08:15:32
less是一门CSS预处理语言,本身不是一门直接使用的语言,而是一门生成CSS的语言。 总结: 1 less中只有/*注释*/ 这种注释方法才会被编译到CSS文件中。 //注释 这种注释方法是无法被编译到CSS文件中的。 2 变量 less文件中使用@来声明一个变量 例如 @color:pink 声明后后面如有需要复用这种颜色可以直接使用color: @color 这种方法, 便于后期维护。 选择器和属性名的使用方式不一样(如有需要是使用 查询百度)。 声明方式: @selector : #nav 使用方式: @{selector} : {~~~} !important 变量的延迟加载,less文件中是有块级作用域,{}代表一个块级作用域,变量延迟加载即在一个作用域中不在遵循按照代码顺序来读取变量! { @var = 2 three : @var @var = 3 } 此时three:的值会为3 3 嵌套规则 &的作用加载前面是代表标签平级关系!!! 4 less混合 ① 普通混合 将公共代码提出来写一个样式例如 .public {width:100px , height:100px} 复用时只需要使用.nav { .public } , 此种方案会导致编译至CSS文件中 ② 不带输出的混合 将公共代码的样式后面加上() .public (){width:100px ,

To use a single command in converting from binary to ascii hex

那年仲夏 提交于 2019-12-13 07:46:36
问题 I am converting binary data into hex and viewing this hex data in head from a continuous stream. I run the following where the conversion is from here echo "ibase=2;obase=10000;$(echo `sed '1q;d' /Users/masi/Dropbox/123/r3.raw`)" \ \ | bc \ \ | head and I get (standard_in) 1: illegal character: H so wrong datatype. How can you do the conversion form binary to binary ascii by a single command efficietly? 回答1: I run the following code based on Wintermute's comment hexdump -e '/4 "%08x\n"' r3

Eclipse does not reload compiled css while running

风格不统一 提交于 2019-12-13 07:35:05
问题 TLDR; Eclipse does not seem to detect changes in compiled css file and does not reload them on a running server. Problem I can successfully generate css files from less files using wro4j everytime i update a less file. I have followed this tutorial from the official spring boot website itself. Text from the tutorial The wro4j-maven-plugin has some Eclipse integration features and you can install it from the Eclipse Marketplace (try it later if this is your first time - it’s not needed to

Concatenate variable with string to form another variable

北城余情 提交于 2019-12-13 07:33:22
问题 @color-purple: "#ffffff" @colors: purple, light-purple, green, light-green, red, light-red, grey, light-grey, lightest-grey; .ColorsMixin(@i:0) when(@i =< length(@colors)){ //loop over icons array @color: extract(@colors, @i); //extract the icon at current index @i .color--@{color}{ background: @{color-@{color}}; &:before{ content: "@{color}"; } &:after{ content: "\@{color-@{color}}"; } } .ColorsMixin(@i + 1); } .ColorsMixin(); So, I can get it to do what I want to do in the content: "\@

Intellij IDEA + JBoss doesn't update LESS files on runtime compilation

一笑奈何 提交于 2019-12-13 07:10:09
问题 unfortunately googling didn't help :( I have deployed a simple project on JBoss5.x integrated in my Intellij IDEA. I use some mvc frameworks with JSP pages. So I run my project, works with it and when I edit any JSP I can just click "Run" >> "Update JBoss" >> "Update resources" and all my changes to JSPs will be applied without redeploying the server. But this doesn't work with LESS files (LESS is for dynamic css). I cannot figured out why? Any hints? PS: less file is mentioned on JSP

I have to clear cookies each time I modify css file

拈花ヽ惹草 提交于 2019-12-13 07:06:52
问题 This is such an annoying and timeconsuming bug! Since a while back I have to clear the cookies each time I change something in my .css file. Well, currently it's a .less file. But this has happened to me before and also my buddy when working with a .css file. If I don't clear cookies after a change nothing happens with the site.. Frustrating! Someone have any good explanation for this strange behavior? :) Thanks 回答1: Are you sure your CSS isn't just getting cached by the browser? The next