less

LESS: Better to use inheritance or multiple classes

﹥>﹥吖頭↗ 提交于 2019-12-31 08:36:35
问题 I have a LESS file with an inputbase(){} class. I use it on a lot but not every input type. When I compile I have a lot of repeated styles in the outputted CSS file. I took a look out how bootstrap use LESS for their grid and they use the same approach; where column 1 etc would inherit from a column base class. Again this seems to generate a lot of CSS. Should I be using .inputbase .specificClass in every <input /> instead of using LESS inheritance? 回答1: Various Options, No Set Answer It's

LESS: Better to use inheritance or multiple classes

蹲街弑〆低调 提交于 2019-12-31 08:35:08
问题 I have a LESS file with an inputbase(){} class. I use it on a lot but not every input type. When I compile I have a lot of repeated styles in the outputted CSS file. I took a look out how bootstrap use LESS for their grid and they use the same approach; where column 1 etc would inherit from a column base class. Again this seems to generate a lot of CSS. Should I be using .inputbase .specificClass in every <input /> instead of using LESS inheritance? 回答1: Various Options, No Set Answer It's

Colors in Bootstrap custom download?

若如初见. 提交于 2019-12-31 05:05:07
问题 So I'm using the Bootstrap Customize and Download page to generate a version of the Bootstrap files with custom colors. I got the idea that I wanted to add some other colors (e.g. @purpleLight) to make upkeep of the site design easier, so I look through the downloaded contents the site generates, and my customizations don't appear to be anywhere, let alone somewhere for me to add others. Here's what comes in the bootstrap.zip the site spits out: css bootstrap.css bootstrap.min.css img

My LESS math operations aren't working in my media query definitions

筅森魡賤 提交于 2019-12-31 03:41:08
问题 I'm trying to make the breakpoints of a layout a less-variable so I could easily check out multiple ideas but this: @breakpoint: 500px; @media all and (min-width: @breakpoint){ #someid{ height: 4321px; } } @media all and (min-width: @breakpoint + 1){ #someid{ height: 1234px; } } #someid{ height: @breakpoint + 1; } compiles to this: @media all and (min-width: 500px) { #someid { height: 4321px; } } @media all and (min-width: 500px + 1) { /*THE PROBLEM*/ #someid { height: 1234px; } } #someid {

sqlmap使用教程

百般思念 提交于 2019-12-31 02:34:02
前言 本文是介绍sqlmap在sql注入时的使用,由于本身sqlmap拥有的复杂的功能,想要把sqlmap全部介绍完成是非常困难的,但同样由于sqlmap拥有的复杂的功能,能给我们在渗透时提供极大的便利性,节省了时间成本。sqlmap的功能我在这里不会全部讲述,只会讲述一部分,但在日后的使用中我会将新使用的部分写出来,下面开始正文部分。 sqlmap使用 测试环境 1.kali一台(自带sqlmap工具) 2.windows 7 phpstudy (http主机) 如果有对sql注入不熟悉的可以看我前面一篇博客 https://blog.csdn.net/qq_40252049/article/details/103612674 下面开始 流程 确定网络连接 kali上成功连接到网站 http://localhost/sqlilab/sqlilab/Less-1/ 进入kali中sqlmap输入 sqlmap -u “http://localhost/sqlilab/sqlilab/Less-1/?id=1” 结果如下图: 注意sqlmap其中有一点,sqlmap中会有一些交互式语句,会提醒你是否使用?如果想要全部选是输入下面命令 sqlmap -u “http://localhost/sqlilab/sqlilab/Less-1/?id=1” --batch sqlmap -u

How to add different CSS style to every nth element, depending on n using LESS

江枫思渺然 提交于 2019-12-30 20:58:32
问题 I am trying to add different padding to subsequent elements in a div. My DOM looks pretty simple. <div class="parent"> <div>0</div> <div>15</div> <div>30</div> ... </div> So I would like for my first element to have 0 padding, my second 15, third 30 etc. Using LESS , how could I make this work? I have tried: .parent div:nth-of-type(n) { padding-left: n*15px; } Thank you! 回答1: Using less(but you have to set the num of elements): .parent (@indexstart,@index) when (@indexstart < @index ){ div

less匹配模式

≡放荡痞女 提交于 2019-12-30 14:29:45
文章目录 less匹配模式: 函数+运算 参考: https://blog.csdn.net/yuhui01/category_7781547.html less匹配模式: 参考:https://blog.csdn.net/YUHUI01/article/details/80947259 1、根据传参的值不同进行匹配 . a ( @_ , @z ) { // @ _ : 所有情况都会执行的公共模式 font-size : 12px ; } . a ( right, @m ) { // 只有是right的时候,会执行 margin-right : @m ; } . a ( left, @m ) { // 只有是left的时候,会执行 margin-left : @m ; } // 调用 .x { . a ( right, 20px ) } .y { . a ( left, 15px ) } 2、根据传参的个数不同进行匹配 . test ( @width , @color ) { //less color : @color ; width : @width ; } ; . test ( @width ) { width : @width ; } @width : 200px ; @color : red ; div { . test ( @width , @color ) ; } //

How do I make a list of CSS rules in LESS based on an unknown number of input arguments?

不羁岁月 提交于 2019-12-30 11:52:08
问题 I'd like to make a LESS mixin for translating images like so: .translate('/images/image.png', de, en-uk); with an output that looks like this: background-image: url('/images/image.png'); &:lang(de){ background-image: url('/images/image_de.png') } &:lang(en-uk){ background-image: url('/images/image_en-uk.png') } This would be easy if we were always translating the same number of languages, but unfortunately we are not (the content is the same across certain locales). I'm not sure how to make

How do I make a list of CSS rules in LESS based on an unknown number of input arguments?

天大地大妈咪最大 提交于 2019-12-30 11:51:57
问题 I'd like to make a LESS mixin for translating images like so: .translate('/images/image.png', de, en-uk); with an output that looks like this: background-image: url('/images/image.png'); &:lang(de){ background-image: url('/images/image_de.png') } &:lang(en-uk){ background-image: url('/images/image_en-uk.png') } This would be easy if we were always translating the same number of languages, but unfortunately we are not (the content is the same across certain locales). I'm not sure how to make

Referencing parent with multiple levels of nesting in LESS

▼魔方 西西 提交于 2019-12-30 10:07:35
问题 I have the following LESS: .container { .column, .columns { .one& { width: 40px; } } } When I compile I'm getting the following for my CSS: .one.container .column, .one.container .columns { width: 40px; } But I expected to get: .container .one.column, .container .one.columns { width: 40px; } It appears the parent operator ( & ) in LESS is actually referencing what I'd expect to be the grandparent. Am I nesting things properly? The docs don't show any examples of nesting more than one level