В моем приложении Rails. Это как мой файл custom.css.scss выглядит следующим образом:RoR SCSS/CSS вне функции
@import "bootstrap";
/* mixins, variables, etc. */
$grayMediumLight: #eaeaea;
@mixin box_sizing {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/* footer */
footer {
margin-top: 45px;
padding-top: 5px;
padding-right: 40px;
padding-left: 40px;
border-top: 1px solid $grayMediumLight;
color: $grayLight;
a {
color: $gray;
&:hover {
color: $grayDarker;
}
}
small {
float: left;
}
ul {
float: right;
list-style: none;
li {
float: left;
margin-left: 10px;
}
}
}
И у меня есть _footer.html.erb частичное здесь:
<footer class="footer">
<small>
<a href="https://twitter.com/siaw23">Twitter:</a>
Siaw23
</small>
<nav>
<ul>
<li><a href="https://music.twitter.com/">Music :D</a></li>
</ul>
</nav>
</footer>
И мой application.html.erb так:
<!DOCTYPE html>
<html>
<head>
<title>Kalendar</title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
<%= render 'layouts/footer' %>
</body>
</html>
У меня есть bootstrap в моем Gemfile, и я запустил bundle install
, но эффект css не работает. Почему? Здесь можно использовать некоторую помощь.
Это как моя страница выглядит в настоящее время:
Это мой application.css
/*
*= require_tree .
*= require bootstrap
*/
Вы можете поделиться application.css? – muttonlamb
@muttonlamb application.css пуст:/ – Emanuel
Я добавил свой контент application.css – Emanuel