jhardy / Sassy-Buttons

MIT License
287 stars 59 forks source link

_sassybuttons.scss filename change #40

Closed azanebrain closed 11 years ago

azanebrain commented 11 years ago

Not sure if this has been covered, or if I'm doing it wrong (I'm running Command Prompt with Ruby on a Windows 8 machine), but I think the readme needs to get updated:

#import sassy buttons partial into your sass/scss file
@import "sassy-buttons"

When I run 'compass install sassy-buttons', the file that gets added is titled '_sassybuttons.scss'

If I copy the '@import "sassy-buttons"', I get a 'File to import not found or unreadable: sassy-butons.' error. Because there is no 'sassy-buttons.scss' file (with the dash).

Importing like this:

@import "sassybuttons"

works fine.

jhardy commented 11 years ago

Did you add this to your compass config.rb?

require "sassy-buttons"

So there has been some confusion around this and I need to update the docs, but what is happening is that the partial _sassybuttons.scss is created just as a reference for the api and the available mixins and variables. You should be able to use sassy-buttons without running 'compass install sassy-buttons' and just put '@import "sassy-buttons"' in your main Sass file.

The "_sassybuttons.scss" partial is calling '@import "sassy-buttons"' at the top of the file so if that works I am not quite sure why its not working when you try it.

Can you just try quickly starting up a new project and skip the 'compas install sassy-buttons' step and then try

@import "sassy-buttons"

and see if that still fails. I dont have ruby install on my Windows 8 virtual box to test this in that environment.

azanebrain commented 11 years ago

Going with just

require "sassy-buttons"

and

@import "sassy-buttons"

works perfectly.

You're right that the problem is with the documentation. Going with just require/import sassy-buttons works right out of the box. But if you follow the instructions and run

compass install sassy-buttons

a file sass/_sassybuttons.scss is created. So the @import "sassy-buttons" is not referencing the file that compass created. To get that, you need @import "sass/sassybuttons". And without that later import, you're not including the second 'sassybuttons.scss' at all

When it comes to rails I have no idea what's going on, but it looks like there are two separate "sassy buttons" sass files: ruby's sassy-buttons and compass' _sassybuttons.scss

If you think this is a Windows 8 + Ruby problem I can keep testing it for you

jhardy commented 11 years ago

Yeah, you are correct the documentation needs some work. I am working on an updated version and will be sure to address all those small inconsistencies in the documentation.

It would be great if you could keep an eye out for any other issues in the Win8 environment, I would appreciate it.