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

Add vendor prefixing to distributed Sass version? #1

Open
kennethormandy opened this issue Jun 15, 2014 · 5 comments
Open

Add vendor prefixing to distributed Sass version? #1

kennethormandy opened this issue Jun 15, 2014 · 5 comments
Labels

Comments

@kennethormandy
Copy link
Owner

While normalize-opentype.css includes the vendor prefixing, normalize-opentype.scss doesn’t and will work best with Autoprefixer and the like. I’m open to reevaluating how this is done, if you’re using Sass and have a strong opinion, please share your setup! One option would be a vendor-prefixed version in dist/ or dropping the Sass version entirely, as I also want to avoid confusion about which file to use.

I think the ideal solution would be if libsass added support for importing plain CSS files.

@kpeatt
Copy link
Contributor

kpeatt commented Jun 19, 2014

I think saying the SCSS version relies on Autoprefixer is a fine solution — these are your development files and should match your style.

As far as I know, it's as designed for Sass to just fall back to standard @import rules when you point it at a .css file so you generate an additional request. Would definitely be nice to say: "Just read this in as if it was a .scss file"

@kpeatt
Copy link
Contributor

kpeatt commented Jun 20, 2014

Continuing thought on this: I had a bit of a problem with the compressed output style that node-sass was giving you and you're not really taking advantage of any Sass features here. Might be best to just have it written in CSS like Normalize. People who need a Sass version could just rename the file extension or fork this. Writing it in CSS would save you from those readability issues in that outputted CSS file.

@janzelc
Copy link
Contributor

janzelc commented Aug 16, 2014

I think just using the .css version would make sense. Unless, of course, you find a use for Sass features.
At the very least, mention that .scss version needs Autoprefixer in the readme or include a vendor-prefixed version in /dist, as you said. That threw me for a bit.

@Zegnat
Copy link

Zegnat commented Sep 15, 2014

I wonder if the Sass version could be made to make more use of Sass? If the font-feature-settings property is created by some mixin it would be easy enough to also have it output vendor prefixes without cluttering the rest of the code.

I’ve been trying something like that here: normalize-opentype-with-mixin.scss.

@kennethormandy
Copy link
Owner Author

@Zegnat Hey, thanks. I appreciate you taking a stab at that but it’s not quite what I’m looking for. I actually added the font-feature-settings mixin to Bourbon—that might be a good option if you like the mixin based approach elsewhere—but Autoprefixer has increasingly become the choice for doing prefixing.

I’m using Autoprefixer to build the .css version (you can run npm run build-prefix to see it in action) but I’m still questioning whether there should be a Sass version at all (since, as you point out, I’m not using it very much). I will probably drop it at v1.0.0, or when Libsass supports importing of regular CSS files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants