我正在使用 rails 和twitter-bootstrap-rails的最新版本,但我无法让我的输入显示占位符文本。当我添加以下内容时:
@placeholderText: @grayLight
在我的 bootstrap_and_overrides.css.less 中,我得到一个 Less::Error 有人可以告诉我我缺少什么吗?
Syntax Error on line 30
(in /home/ubuntu/new-project/app/assets/stylesheets/bootstrap_and_overrides.css.less)
更新** 感谢 xnm,错误现在消失了,但我仍然没有占位符文本。这是我的
@import "twitter/bootstrap/bootstrap";
body { padding-top: 60px; }
@import "twitter/bootstrap/responsive";
// Set the correct sprite paths
@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
@iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');
// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
@fontAwesomeEotPath: asset-path('fontawesome-webfont.eot');
@fontAwesomeWoffPath: asset-path('fontawesome-webfont.woff');
@fontAwesomeTtfPath: asset-path('fontawesome-webfont.ttf');
@fontAwesomeSvgzPath: asset-path('fontawesome-webfont.svgz');
@fontAwesomeSvgPath: asset-path('fontawesome-webfont.svg');
// Font Awesome
@import "fontawesome";
// Your custom LESS stylesheets goes here
//
// Since bootstrap was imported above you have access to its mixins which
// you may use and inherit here
//
// If you'd like to override bootstrap's own variables, you can do so here as well
// See http://twitter.github.com/bootstrap/less.html for their names and documentation
//
// Example:
@linkColor: #ff0000;
@placeholderText: @grayLight;
这是我的html:
<div class="placeholding-input">
<input type="text" class="text-input" autocomplete="off" name="user[name]" maxlength="20">
<span class="placeholder">Full name</span>
</div>
生成的样式表只是没有给我占位符样式。我想我应该 @import 一些东西,但我找不到任何信息。