I know this is old question but I have been digging my head from many hours. Gone through all the links of SO but still unable to resolve this issue.
My fonts are in fonts directory which is present in assets directory. If i try to use asset-url
it give me error saying Barrio font not found while my fonts is in the directory.
# application.rb
config.assets.paths << "#{Rails.root}/app/assets/fonts"
config.assets.precompile += %w( .otf )
# style.scss
@font-face {
font-family: "Barrio-Regular";
src: asset-url("Barrio-Regular.otf");
}
.catagories-list {
label {
font-family: "Barrio-Regular, Arial, Helvetica, sans-serif";
font-size: 18px;
}
li {
a {
color: #2c2c2c;
}
margin-bottom: 10px;
text-indent: 20px;
&.active a {
text-decoration: underline;
color: #2f2993;
}
}
}