0
votes

I have added the bourbon webjar to my build.sbt:

val Bourbon = "org.webjars.bower" % "bourbon" % "4.2.3"

In my sass file (app/assets/stylesheets/main.sass) I have the import:

@import "../../../target/web/web-modules/main/webjars/lib/bourbon/app/assets/stylesheets/bourbon"

I am somewhat uncomfortable with the ../ and the path length.

Interestingly it seems to be packaged into its own app/assets/stylesheets directory.

Is there any other way to specify the import?

1

1 Answers

0
votes

I've been working on implementing a Sass plugin myself. I've made sure that webjars can be included easily.

Using this plugin, it should be possible to include a webjar library by:

@import "lib/<library name>/path/to/sass/stylesheet";

So for Bourbon in particular use for example:

@import "lib/bourbon/app/assets/stylesheets/bourbon";

// example of bourbon mixin usage
a.tooltip-anchor + .tooltip:after {
  content: "";
  position: relative;
  top: -12px;
  @include triangle(6.5em 2.5em, #FF0000, down);
}