Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Convert from LESS to Sass preprocessor #75

Closed
wants to merge 1 commit into from

Conversation

pdehaan
Copy link
Contributor

@pdehaan pdehaan commented Sep 16, 2015

This commit adds a /css/_tabzilla.scss file and you can do require('mozilla-tabzilla').includePaths (or require('mozilla-tabzilla').with(['path1', 'path2'])) so you can do @import 'tabzilla'; from your .scss files.

Fixes #74

@pdehaan
Copy link
Contributor Author

pdehaan commented Sep 16, 2015

Another option may be to use something like gulp-base64 to inline the 2 images into the final CSS/Sass files to remove the need to manage the /media assets.

@@ -0,0 +1,39 @@
@import 'bourbon';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to make bourbon a dependency for a single mixin used only once?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shrug It does seem like overkill. We could just make a custom mixin to do the media query (or hard code it).

@pdehaan
Copy link
Contributor Author

pdehaan commented Sep 16, 2015

@jpetto Replaced the node-bourbon dependency with an inline retina() mixin.

@alexgibson
Copy link
Member

Another option may be to use something like gulp-base64 to inline the 2 images into the final CSS/Sass files to remove the need to manage the /media assets.

If we did this, it would be good to make it optional perhaps. I believe some really old browsers (cough IE) may throw insecure content warnings on base64 inline images. Might not be an issue for most web sites, but this tab gets used in a lot of places.

@alexgibson
Copy link
Member

Also not to bikeshed, but curious why the switch to Sass? I was under the impression Less was more commonly used on Mozilla sites (or Stylus).

(Fwiw, personally I do like Sass - just not as common to see it used here as other pre-processors)

@pdehaan
Copy link
Contributor Author

pdehaan commented Sep 16, 2015

@alexgibson No real reason, just that our projects use Sass and this would make it easier to integrate.
If we really want to stick w/ LESS, that's cool too, we can probably just add ~3 lines to copy "tabzilla/css/tabzilla.css" to "tabzilla/css/_tabzilla.scss" in the gulp dist task.

@pdehaan
Copy link
Contributor Author

pdehaan commented Sep 16, 2015

@alexgibson See alternate #76 PR for adding basic Sass support while sticking w/ LESS.

@pdehaan
Copy link
Contributor Author

pdehaan commented Sep 16, 2015

Re: Sass vs LESS, I saw this the other day: http://ashleynolan.co.uk/blog/frontend-tooling-survey-2015-results

Sass: 66%
LESS: 13%

@alexgibson
Copy link
Member

Re: Sass vs LESS, I saw this the other day: http://ashleynolan.co.uk/blog/frontend-tooling-survey-2015-results

This is indeed very true in the wider web dev world. I only mentioned it here because the majority of moz sites seem to be Django/Python based.

@schalkneethling
Copy link

I am going to close this one as I prefer the solution of adding Sass [https://github.com//pull/76] instead of replacing LESS. Thanks @pdehaan

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

Successfully merging this pull request may close these issues.

4 participants