Ruby on rails 使用引导获取占位符文本

Ruby on rails 使用引导获取占位符文本,ruby-on-rails,css,ruby-on-rails-3,twitter-bootstrap,less,Ruby On Rails,Css,Ruby On Rails 3,Twitter Bootstrap,Less,我使用的是rails的最新版本,但无法让输入显示占位符文本。当我添加以下内容时: @placeholderText: @grayLight 对于我的bootstrap_和_overrides.css.less,我得到一个less::错误 有人能告诉我我错过了什么吗 Syntax Error on line 30   (in /home/ubuntu/new-project/app/assets/stylesheets/bootstrap_and_overrides.css.less) 更新*

我使用的是rails的最新版本,但无法让输入显示占位符文本。当我添加以下内容时:

@placeholderText: @grayLight
对于我的bootstrap_和_overrides.css.less,我得到一个less::错误 有人能告诉我我错过了什么吗

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一些东西,但我找不到任何信息。

与sass不同,less在每行末尾使用分号

@placeholderText: @grayLight;

与sass不同,less在每行末尾使用分号

@placeholderText: @grayLight;

我找到了。显然正确的方法是:

<input type="text" class="text-input" name="user[name]" maxlength="20" placeholder="Full name">


非常混乱,因为我从twitter主页复制了不正确的方式。

我找到了它。显然正确的方法是:

<input type="text" class="text-input" name="user[name]" maxlength="20" placeholder="Full name">


非常混乱,因为我从twitter主页复制了不正确的方式。

查看此问题,并更新此问题。

查看本期及其更新。

完整的错误将有所帮助。
bootstrap\u和\u overrides.less.css
是一个打字错误吗?因为如果不是,那就是你的问题。是的,你是对的。修正了输入错误并添加了错误,但我认为这不会有帮助。完整的错误会有帮助。
bootstrap\u和\u overrides.less.css
是一个打字错误吗?因为如果不是,那就是你的问题。是的,你是对的。修正了输入错误并添加了错误,但我不认为这会有帮助。谢谢,这使错误消失了,但我仍然没有收到placehodler文本。请参阅上面的更新。谢谢,这使错误消失了,但我仍然没有收到placehodler文本。请参阅上面的更新。