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

[1758] Use Python-based SASS library for compilation #1769

Merged
merged 1 commit into from
Dec 16, 2013
Merged

[1758] Use Python-based SASS library for compilation #1769

merged 1 commit into from
Dec 16, 2013

Conversation

seanlinsley
Copy link
Contributor

Resolves #1758

  • move over to a Python SASS library so we don't have to rely on the Ruby version, and hence can include it as part of the devlopment environment
  • use the same library for deployment (in production we set GITTIP_CSS_HREF to point to MaxCDN which caches the request for us)

@@ -99,7 +99,7 @@
background-image: -o-linear-gradient(top, #0088cc, #0077b3);
background-image: linear-gradient(to bottom, #0088cc, #0077b3);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
filter: unquote("progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0)");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was running into error reading values after progid, so here I'm using the workaround mentioned in sass/libsass#72

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we live with the fact that IE < 10 would not have the gradient? I know I could 😄 On my sites that would affect around 5% users.

@zbynekwinkler
Copy link
Contributor

I know very little about the setup at heroku but I will test this locally as soon as I get my working tree clean again. I'd like us to have all python solution, thus simplifying our story.

@zbynekwinkler
Copy link
Contributor

Could you work on a branch in the main repo? It is easier to work with that way (at least for me). Thanks.

@zbynekwinkler
Copy link
Contributor

I used https://github.com/splitbrain/git-pull-request to work with the PR.

Why did you pick this implementation? Is the ruby version using the same engine undercover or is this a completely different implementation? It gives me some warnings during compilation (some uninitialized variables, redefinition of _POSIX_C_SOURCE and maybe others). Does it matter?

@zbynekwinkler
Copy link
Contributor

What happens in production? Do we rebuild the file with each request? Do we serve the css file through the CDN?

@clone1018
Copy link
Contributor

Why are we doing additional jQuery and post_compile changes in this pull request and not in their own pull request?

@seanlinsley
Copy link
Contributor Author

Why did you pick this implementation? Is the ruby version using the same engine undercover or is this a completely different implementation?

This PR uses libsass-python, which is a fork of the C & C++ libsass, but with added Python bindings. The errors that you mention are caused by the C code actually compiling on your machine. I get some myself when compiling, but they don't seem to be a problem.

What happens in production? Do we rebuild the file with each request? Do we serve the css file through the CDN?

I'm guessing we rebuild for each request, since we have GITTIP_CACHE_STATIC which manually sets expires headers.

That's the one problem with this: I don't know if it caches compilation anywhere like the current gem does in .sass-cache/

@seanlinsley
Copy link
Contributor Author

IRC

@seanlinsley
Copy link
Contributor Author

@zwn I added the new envvar to default_tests.env (and force-pushed)

@clone1018
Copy link
Contributor

Alright, this works great for me and tests great if I emulate production and use a pull based cdn. Merging in!

@whit537 before you update production talk to me or @seanlinsley

clone1018 added a commit that referenced this pull request Dec 16, 2013
…pilation

[1758] Use Python-based SASS library for compilation
@clone1018 clone1018 merged commit 9899af3 into gratipay:master Dec 16, 2013
@seanlinsley seanlinsley deleted the assets/1758-python-sass-compilation branch December 16, 2013 01:51
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.

Integrate SASS compilation into development environment
3 participants