ruby on rails - Invalid CSS after "...kground-color: ": expected expression (e.g. 1px, bold), was "@gray-lightest;" -
hello learning rails, getting error message in new project,
invalid css after "...kground-color: ": expected expression (e.g. 1px, bold), "@gray-lightest;"
here application.scss
/* * manifest file that'll compiled application.css, include files * listed below. * * css , scss file within directory, lib/assets/stylesheets, or plugin's * vendor/assets/stylesheets directory can referenced here using relative path. * * you're free add application-wide styles file , they'll appear @ bottom of * compiled file styles add here take precedence on styles defined in other css/scss * files in directory. styles in file should added after last require_* statement. * better create new file per style scope. * */ @import "bootstrap-sprockets"; @import "bootstrap"; @import "home.scss"
then have home.scss
@gray-lightest: lighten(#000, 97.25%); body { background-color: @gray-lightest; }
and have in gemfile
gem 'sass-rails', '5.0.6' gem 'bootstrap-sass', '3.3.7' gem 'jquery-rails', '4.3.1' gem 'haml-rails'
i have seen sass solutions want use scss or css. i've tried updating bundler , gems. other projects doing fine. have done wrong time? why getting error? .scss extension not working? help.
scss support syntax set variable:
$gray-lightest: lighten(#000, 97.25%); body { background-color: $gray-lightest; }
Comments
Post a Comment