less

@Import of less files into a limited scope

不羁岁月 提交于 2019-12-03 06:48:14
问题 I want to import all styles from another less file, but into a limited scope. I'm trying this: "my-site.less" .wrapper-class { @import "path/to/styles.less"; } But this doesn't work at all. I'm using the browser-based less.js option, and I can see the GET statement that is run when it actually does the import. But the resultant CSS does not contain any of the styles from the other sheet. If I do it like this, it works: .wrapper-class { /* ... */ } @import "path/to/styles.less"; But this

less.css sharing variables across files

守給你的承諾、 提交于 2019-12-03 06:26:21
问题 I am using less.css to simplify my css styling. I'd like to declare a varaible in one less file and share its usage across my many less files. Is this possible? For example: english.less @languageFloat: left; chart.less div#footer a.web { display: block; float: @languageFloat; color: #cccccc; margin-right: 10px; } 回答1: The best way to do this is to @import your LESS file with all your variables in it. Here's the syntax for the @import keyword: // For LESS file includes, @import "lib.less"; //

Load variables into LESS CSS preprocessor from JSON file

不问归期 提交于 2019-12-03 05:38:15
Is it possible to load variables into LESS CSS preprocessor from a JSON file like you can do with Stylus? With contents of file myvars.json { "color1": "#112345", "color2": "#667890" } In Stylus I do... json('myvars.json') body{ background-color: color1; } Is it possible to do this in LESS? I want to keep the file as JSON, so I can easily re-use it in javascript. Martin Turjak In less.js you can make use of javascript interpolation (using the back-ticks). And call a function that loads the json object with the variables from the file ... from which you can extract the variable by its key -

LESS css set dynamic background image with mixin

試著忘記壹切 提交于 2019-12-03 05:29:29
I am using LESS CSS . I am currently using Mixins with variables. Something like this works okay : .border-radius (@radius) { border-radius: @radius; } #header { .border-radius(4px); } This is not : .bg-img(@img) { background-image:url(@img); } #logo { .bg-img("../images/logo.jpg"); } i have tried combinations of using ' & " in the background-image:url ('') & ("") but then it tries to get the image as images/@img instead of the image name. other wise it gives me an error of Cannot call method 'charAt' of undefined I think writing background-image:url() all the time is too tedious, is this

Why is Bootstrap trying to load LESS files in Edge?

旧街凉风 提交于 2019-12-03 05:24:00
I have a web page using Twitter Bootstrap. It works well in Chrome, Firefox, and Safari. However, when I try to view it in Edge on Windows 10, I get a bunch of 403 errors saying it failed to load a slew of .less files from the Bootstrap CDN. Why are .less files being requested if the browser can't do anything with them? I am not using LESS at all, just plain CSS3, which is rendering just fine. How do I make this stop? The good news is this won't be affecting regular users of the site. The bad news is this is also happening in Chrome to some extent, it's just that the network tab in Chrome isn

Bootstrap, making responsive changes to layout

China☆狼群 提交于 2019-12-03 05:11:43
问题 I'm using a fluid Twitter Bootstrap layout for my design and am about to make it responsive. Consider a grid such as this: <div class="row-fluid"> <div class="span4"></div> <div class="span8"></div> </div> What is the best way to hide span4 and let span8 take up the entire width, to be used when the screen gets smaller? 回答1: Using a media query with whatever min/max width set .span4 to display: none; Then, add .span8 to the rule for .span12 for everything below whatever width you hide .span4

How to effectively use the Frameless grid?

不羁岁月 提交于 2019-12-03 05:04:00
I'm starting building a website good for mobile devices too. So I'm also starting studying media queries and the various grid frameworks. I've taken a look to all the 'main players' like Inuit.css, the semantic grid etc.. and found that probably the best one for me is the frameless grid The author says it's 'the spiritual successor to Less Framework ': Ok. I've studied a lot all the less/css code and html code of the main framelessgrid.com page (that should implement the frameless grid) but I can't fugure out how really I can implement it. First of all, what does he exactly mean by 'frameless'

Node.js - express - jade - compile SASS/LESS

徘徊边缘 提交于 2019-12-03 04:48:20
问题 Anyone have a really newbie guide to nodejs - express - SASS/LESS? I have not been able to get this working. The example I have now is a bareboned as possible.. var express = require('express'), less = require('less'), app = express.createServer(); var pub_dir = __dirname + '/public'; app.configure(function(){ app.use(express.compiler({ src: pub_dir, enable: ['less'] })); app.use(express.staticProvider( pub_dir )); }; app.configure('development', function(){ app.use(express.errorHandler({

How to compile less/sass files in Visual Studio 2017

☆樱花仙子☆ 提交于 2019-12-03 04:00:40
问题 In VS <= 2015 we can use WebEssentials extension that takes care for compiling the less/sass files for us, but currently it does not support VS 2017. Are you aware of similar extension that can compile less/sass on build? 回答1: WebEssentials is being split up into multiple extensions. I believe the functionality you want is now in the Web Compiler extension. If you want to do it without extensions, you could use a task runner like Gulp. See here for a walkthrough of how to integrate Gulp tasks

oracle表分区二 转

与世无争的帅哥 提交于 2019-12-03 03:55:29
此文从以下几个方面来整理关于分区表的概念及操作: 1.表空间及分区表的概念 2.表分区的具体作用 3.表分区的优缺点 4.表分区的几种类型及操作方法 5.对表分区的维护性操作. (1.) 表空间及分区表的概念 表空间: 是一个或多个数据文件的集合,所有的数据对象都存放在指定的表空间中,但主要存放的是表, 所以称作表空间。 分区表: 当表中的数据量不断增大,查询数据的速度就会变慢,应用程序的性能就会下降,这时就应该考虑对表进行分区。表进行分区后,逻辑上表仍然是一张完整的表,只是将表中的数据在物理上存放到多个表空间(物理文件上),这样查询数据时,不至于每次都扫描整张表。 ( 2).表分区的具体作用 Oracle的表分区功能通过改善可管理性、性能和可用性,从而为各式应用程序带来了极大的好处。通常,分区可以使某些查询以及维护操作的性能大大提高。此外,分区还可以极大简化常见的管理任务,分区是构建千兆字节数据系统或超高可用性系统的关键工具。 分区功能能够将表、索引或索引组织表进一步细分为段,这些数据库对象的段叫做分区。每个分区有自己的名称,还可以选择自己的存储特性。从数据库管理员的角度来看,一个分区后的对象具有多个段,这些段既可进行集体管理,也可单独管理,这就使数据库管理员在管理分区后的对象时有相当大的灵活性。但是,从应用程序的角度来看,分区后的表与非分区表完全相同,使用 SQL DML