Skip to content

TIL Rails: Replace Require With Sass Import for jQuery-UI #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2015

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.

2 participants