Skip to content

Conversation

@stevenyap
Copy link
Contributor

In order to load all of the jQuery UI css files, we need

/*
 *= require jquery-ui
 */

@import 'jquery-ui'; # DOES NOT WORK!!!

@import 'jquery-ui'; does not work because SASS import will look for a
file called jquery-ui.scss.

To work around this, we can simply change it to:

@import 'jquery-ui.css';

Now SASS @import will import the css file.

In order to load all of the jQuery UI css files, we need

```ruby
/*
 *= require jquery-ui
 */

@import 'jquery-ui'; # DOES NOT WORK!!!
```

`@import 'jquery-ui';` does not work because SASS import will look for a
file called `jquery-ui.scss`.

To work around this, we can simply change it to:

```ruby
@import 'jquery-ui.css';
```

Now SASS `@import` will import the css file.
jamesfwz added a commit that referenced this pull request Nov 18, 2015
TIL Rails: Replace Require With Sass Import for jQuery-UI
@jamesfwz jamesfwz merged commit d89c1e4 into master Nov 18, 2015
@jamesfwz
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants