Tag: less

将LESS版本的Bootstrap-Material-Design集成到Rails项目中

我正在使用这个gem bootstrap-material-design ,它是https://github.com/FezVrasta/bootstrap-material-design库的sass版本,但最近我注意到sass版本不再维护了。 问题我面对的这个gem是它不会将按钮和flash消息转换为素材样式。 这里建议的一个解决方案 : https : //github.com/FezVrasta/bootstrap-material-design/issues/535是使用LESS版本,但我不知道如何集成此库的LESS版本。 有人已经这样做了吗? 更新 : 如果有人想要将Bootstrap-Material-Design添加到他们的网站而不使用任何框架或服务器端语言,如Ruby,PHP等……,只需使用HTML5,CSS3和JS。 他们可以按照以下说明操作: 安装和下载bootstrap-material文件夹 bower install bootstrap-material-design 在head标记下链接bootstrap css和material css minified file 链接Javascript文件 最后,您必须在身体底部使用此脚本初始化一些材质组件 $(document).ready(function() { $.material.init(); });

ActionView :: Template :: Error(变量@fontAwesomeEotPath_iefix未定义)

尝试加载任何页面时出错: ActionView::Template::Error (variable @fontAwesomeEotPath_iefix is undefined) (in /app/assets/stylesheets/bootstrap_and_overrides.css.less)): 2: 3: 4: Program 5: “all” %> 6: 7: 8: app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb__242882506_70513990′ app/controllers/problems_controller.rb:7:in `index’ 我以前做过什么? 只需运行bundle update

#Grease :: Adapter(Less :: Rails :: ImportProcessor)的未定义方法`new’

我在Gemfile中更新了一个gem,并在运行“bundle”命令后开始面对Grease :: Adapter错误。 问题似乎与我的应用程序的CSS。 错误如下: NoMethodError: undefined method `new’ for # 我正在使用rails版本“4.1.8”。 任何人都可以帮我解决这个问题吗?

如何让Twitter Bootstrap的Less文件与Sinatra AssetPack一起使用?

我试图让Bootstrap的Less文件与Sinatra AssetPack一起使用,但我得到的解析器错误更少。 这些错误让我相信通过bootstrap.less导入的文件越少,彼此之间就无法识别。 我有一个app.rb文件: require ‘sinatra/base’ require ‘sinatra/assetpack’ class App < Sinatra::Base set :root, File.dirname(__FILE__) register Sinatra::AssetPack assets do css :bootstrap, [ '/css/bootstrap.css' ] end get '/' do erb :index end # start the server if ruby file executed directly run! if app_file == $0 end 我已将所有Bootstrap less文件复制到/app/css目录并修改了bootstrap.less,以便每个@import语句以.css而不是.less结尾(但实际的文件扩展名没有更改)。 我还把一切都放在了Github上: https : //github.com/elevine/sinatra-assetpack-bootstrap 这是我得到的一个错误的堆栈跟踪的前半部分: Less::ParseError – […]