Skip to content
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

Compass integration #593

Closed
gpakosz opened this issue Apr 27, 2014 · 5 comments
Closed

Compass integration #593

gpakosz opened this issue Apr 27, 2014 · 5 comments

Comments

@gpakosz
Copy link
Contributor

gpakosz commented Apr 27, 2014

Hello,

I'm new to Bootstrap so please forgive me if I overlooked something.

The main README.md states:

Assets are discovered automatically on Rails, Sprockets, Compass, and Node + Mincer, using native asset path helpers.

Yet I felt the need to define and import _bootstrap-compass.scss with the following definitions for twbs-font-path and twbs-image-path:

@function twbs-font-path($path) {
  @return font-url($path, true) 
}

@function twbs-image-path($file) {
  @return image-url($path, true) 
}

I needed it so that generated URLs take into account my Compass' http_fonts_dir and http_images_dir settings.

PS: I chose to open an issue instead of asking for support on Stackoverflow because eventually what I described means twbs/bootstrap-sass should provide such a _bootstrap-compass.scss file. Also, I'm not really in need for support since I solved it for my case.

@nschonni
Copy link
Contributor

I'm confused by the use of Sass in a JS file as a solution

@gpakosz
Copy link
Contributor Author

gpakosz commented Apr 27, 2014

@nschonni ah yeah wow, for sure it's a .scss file, not a .js file.

I edited the comment above and replaced _bootstrap-compass.js by _bootstrap-compass.scss.

@glebm
Copy link
Member

glebm commented Apr 28, 2014

@gpakosz Looking good, PR welcome!
Eventually, we can deprecate the ruby extensions for all environments, and provide integration files like this one instead.

glebm added a commit that referenced this issue May 4, 2014
Useful when ruby integration is not available (e.g. as a bower package).
Will be the default way to integrate in the next version.

See also: #592 #593
@glebm
Copy link
Member

glebm commented May 4, 2014

I have added Sass definitions for Compass and Sprockets to the repo. We will make it default for the next version, and deprecate / remove the ruby code.

@glebm glebm closed this as completed May 4, 2014
@gpakosz
Copy link
Contributor Author

gpakosz commented May 5, 2014

@glebm thanks handling it. Indeed I didn't do a PR yet because it had to go beyond providing a _bootstrap-compass.scss file and I wasn't sure how to change the ruby code.

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

No branches or pull requests

3 participants