sass - Add Background Image to .scss File in Ruby on Rails -
I was trying to add a background image to a canvas (Zurb Foundation 5), but I did get this error Pie:
# located in this file: foundation_and_overrides.scss $ off-canvas-bg: #fff url (../ property / img / canvas-bg.jpg) no-repeat;
Error shown:
$ color: (white URL (../ asset / img / canvas-bg.jpg no-repeat) no One color for `color-color '
Any help would be great! Thank you
Just try this snippet code.
@mixin background ($ imgpath, $ position: 0 0, $ repeat: no-repeat) {background: {image: url ($ imgpath); Status: $ position; Repeat: $ Repeat; }}. Test {@ included background ('/ my / img / path.png'); }
It will then output:
. Test {background-image: url ("/ my / img / path.png"); Background-position: 0; Repeat Background: No Repetition; }
Comments
Post a Comment