Skip to content

Commit d89c1e4

Browse files
committed
Merge pull request #9 from futureworkz/sass-import
TIL Rails: Replace Require With Sass Import for jQuery-UI
2 parents 26c04bb + 15c53d8 commit d89c1e4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Replace Require With Sass Import for jQuery-UI
2+
3+
In order to load all of the jQuery UI css files, we need
4+
5+
```ruby
6+
/*
7+
*= require jquery-ui
8+
*/
9+
10+
@import 'jquery-ui'; # DOES NOT WORK!!!
11+
```
12+
13+
`@import 'jquery-ui';` does not work because SASS import will look for a file called `jquery-ui.scss`.
14+
15+
To work around this, we can simply change it to:
16+
17+
```ruby
18+
@import 'jquery-ui.css';
19+
```
20+
21+
Now SASS `@import` will import the css file.

0 commit comments

Comments
 (0)