Question

Stylesheet languages like Sass and Less allow us to organize our stylesheets like real programming source code, in more modular and manageable ways than raw CSS ever could. Using these languages is still a young art, and I'm curious to learn how other developers use them in practice.

One of the neat features about the openness of the web is that we can learn from others by peeking at their HTML and CSS. However, these new stylesheet languages allow developers to keep their stylesheet source code private and only share the compiled CSS output. The standard compiler settings will often have the stylesheet source folder outside the public webroot.

If you use a CSS preprocessor to develop a commercial (closed-source) website, would you consider the stylesheet's source language (Sass or Less) equivalent to the CSS in terms of openness, or is it proprietary source code?

On the one hand, these languages "only" give us different syntax for writing stylesheets, so their function is the same as the CSS that's already publicly visible.

On the other hand, they could be thought of as "source code" and considered proprietary, in the same way as the Ruby or PHP that drives the site is used to generate HTML.

Looking forward to your thoughts.

Was it helpful?

Solution

Looks like you and I are the only ones following the css-preprocessing tag, I just found this and wanted to share some thoughts.

For the small company I work for, we use the same homebrew CMS to manage every site, and there is a lot of magic involved in creating the css files. I don't use LESS or SASS, but a combination of cssmin and my own code. There are theme settings in the CMS that can affect it, and there are other things like url rewrites that have to read settings from php config files. The output is always there for anyone to see, but I wouldn't consider the code that generates it "open source" any more than the code that generates the html output.

Our CMS is not open source, so our policy is that when and if (hasn't happened yet) a client decides to drop us and "wants his website", we generate a static HTML version for them with absolutely no php source code. So they would get the static version of the css/js as well as static html. They are paying for a service, and not so much a product. We don't sell the CMS, we sell our services building the site and access to those same tools. I'm not sure how well this would bode if it happened, but that's our current policy.

Anyways, this might not be exactly what you meant, but I'm looking forward to hearing more on this if anyone ever finds it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top