less

less css calling dynamic variables from a loop

亡梦爱人 提交于 2019-12-30 09:55:21
问题 What I'm trying to do: I have (for now) 7 colors as variables. I want to be able to use them at several places and iterate throught them. This is what I have that don't work @color1:#06A1C0; @color2:#8F4F9F; @color3:#ED1D24; @color4:#5A9283; @color5:#B38C51; @color6:#EC008C; @color7:#8F4F9F; @iterations: 8; .mixin-loop (@index) when (@index > 0) { color@{index}:hover{ @tmp: ~'@color'; @num: @index; color: @tmp@num; } .mixin-loop(@index - 1); } .mixin-loop (0) {} .mixin-loop(@iterations); What

Font Face Mixin for Less

▼魔方 西西 提交于 2019-12-30 08:13:29
问题 Using Less I am defining font-families as follows: @georgia: georgia, times, 'times new roman', 'nimbus roman no9 l', serif; Then I have the less mixin: .font(@family: arial, @size: 1.0em, @lineheight: 1.0, @weight: normal, @style: normal, @variant: normal) { font: @style @variant @weight @size~"/"@lineheight @family; } // font Finally I use it like this: p { .font(@georgia, 1.0em, 1.5) } But I would also like to define font families with custom fonts: @something: 'custom-font', arial, ...;

Parsing LESS options in a Sinatra app

谁说我不能喝 提交于 2019-12-30 07:31:39
问题 I'm having trouble changing the path that LESS uses to include imports. My routes file has get "/css/main.css" do less :main, :paths => ["public/css"] end However, if I include an external less file with @import in my stylesheet the LESS compiler cannot find the file. I've placed a copy in both the views path and public/css directories, but it still can't find it. It CAN however find plain .css files in public\css . 回答1: I hit this today, and was able to solve it like so: require 'less'

Less CSS : Conditional @imports using mixins - Variable scope

无人久伴 提交于 2019-12-30 06:55:46
问题 What I'm attempting to do is @import specific files into my Less project by setting checking for specific variables. This is what I have so far: @import "shared/variables"; @import "shared/global"; @import "shared/hero"; @import "shared/listings"; // // Color Variations // Based on @bt-color-variation // Decides when to load the light/dark theme // @bt-color-variation: dark; // Default color variation .bt-color-variation(dark) { @import "color-variations/dark/global"; @import "color

Bootstrap & LESS: importing mixins only as reference

我是研究僧i 提交于 2019-12-30 02:27:06
问题 I am using Bootstrap 3.0 & LESS 1.5. I'll be using the same bootstrap.css for many sites (or use their CDN). So I am using @import (reference) "bootstrap-3.0.0/less/bootstrap.less"; @import (reference) "bootstrap-3.0.0/less/mixins.less"; to import only as reference. My app.less has (among otherthings) .herocontainer{ .make-row(); .iphoneblock{ .make-sm-column-offset(1); .make-sm-column(4); text-align: center; } .copyblock{ .make-sm-column(5); text-align: center; .copytext{ @media(min-width:

How can I force assetic to render assets each time the page is reloaded?

房东的猫 提交于 2019-12-30 01:59:10
问题 How can I force assetic to render assets each time the page is reloaded (no matter if assets are modified or not)? More explanation about my issue: I'm currently working on a Symfony2 project where I use Assetic to manage and compile .less files. I got everything to work fine but I'm having a small issue that I'd like to fix. In config.yml, I set the assetic use_controller to true. # Assetic Configuration assetic: debug: %kernel.debug% use_controller: true The result is that Symfony

Styling Twitter's Bootstrap 3.x Buttons

馋奶兔 提交于 2019-12-29 10:27:14
问题 Twitter's Bootstrap 3 buttons are limited in colors. By default there will be 5 7 colors (default primary, error, warning, info, success and link) See: Every button got 3 state (default, active and disabled) How to add more colors or create custom buttons? This question is already answered for Twitter's Bootstrap 2.x: Styling twitter bootstrap buttons. Bootstrap 3 is not backwards compatible. There will be lot of changes in the less and css files. Support for IE7 will be dropped. TB3 is

LESS class name string interpolation not working

感情迁移 提交于 2019-12-29 09:41:52
问题 I am currently translating my grid into LESS, but I can't seem to figure out string interpolation. Here's helper class that is supposed to generate all my columns: .createColumns (@colNumber+1) {} .createColumns (@index) when (@index < @colNumber) { (~".col@{index}") { width: @baseWidth * @index; } .createColumns (@index + 1); } .createColumns (01); Problem is, I get error that says something is wrong with this part (~".col@{index}") . Here's the error message: ParseError: Unrecognised input

LESS class name string interpolation not working

你说的曾经没有我的故事 提交于 2019-12-29 09:41:49
问题 I am currently translating my grid into LESS, but I can't seem to figure out string interpolation. Here's helper class that is supposed to generate all my columns: .createColumns (@colNumber+1) {} .createColumns (@index) when (@index < @colNumber) { (~".col@{index}") { width: @baseWidth * @index; } .createColumns (@index + 1); } .createColumns (01); Problem is, I get error that says something is wrong with this part (~".col@{index}") . Here's the error message: ParseError: Unrecognised input

FontAwesome - Failed to decode downloaded font

前提是你 提交于 2019-12-29 06:03:18
问题 I found allready this: https://stackoverflow.com/search?q=Failed+to+decode+downloaded+font But the Answers dont help to fix my problem =/ I got on my page this errors in console: Failed to decode downloaded font: http://devcomlink.kunena.dev-monkeys.com/components/com_kunena/template/devcomlink/fonts/font-awesome/fontawesome-webfont.woff2 index.php?option=com_kunena&view=category&layout=list&Itemid=129&templateStyle=9:1 Failed to decode downloaded font: http://devcomlink.kunena.dev-monkeys