I just switched from Semantic UI to the community maintained Fomantic UI in my Rails app, and get one of two obscure errors when using either the npm package or the sass rails gem.
With the npm package, I get
Less::Error unmatched '/*'whenever thestylesheet_link_tagsand such start to load fomantic assets in the document head. The fomantic styles and js are pulled into my project through the following two files:application.css.scss
*= require 'semantic-ui/src/semanticapplication.js
//= require semantic-ui/dist/semanticI notice that it works when I make both stylesheet and js load from
semantic-ui/dist. However, doing that excludes a lot. Icons stop working. Relevant file stored insemantic-ui/srcis semantic.less. Relevant files stored insemantic-ui/distare semantic.min.css (which i do not require except for just now when switching things around to figure this out) and semantic.min.js (which i do require).Again, it "works" if I require the minified stylesheet in
semantic-ui/dist, and it does not "work" if i require the semantic.less file insemantic-ui/src. Is this a problem with semantic.less or one of the other generated import files?With the sass rails gem, I get a Sass::SyntaxError
Invalid CSS after "i.icon.stopwatch.": expected class name, was "20:before".Looking at the source, I see a number of these declarations:
i.icon.stopwatch.20:before {content: "\f96f";}.Why is that throwing an error?
Does this mean that the npm package and gem have invalid css or that my app is compiling incorrectly? I have no opinions about using the npm package or the gem, I just want it to work. Everything worked fine when I was using the old Semantic UI. I am extremely confused and would greatly appreciate the help. Thank you!
It seems Sprockets doesn't support
lessfrom READMESo you can't use
/srcdirecotry.You could try to
import/dist:Thats a bug from Fomantic-UI already fixed, but have not been updated to Fomantic-UI-SASS