The CSS Preprocessor is a command line and a C++ library used to read, parse, compile, and assemble CSS files. The compiler has support for advanced expressions, cascading declarations, variables, and much more.

csspp 1.0.10 published

I pusblished a new version of CSS Preprocessor (csspp) because 1.0.9 and older had a bug in the output process which would not write the commas between lists of arguments in a declaration. For example, a box-shadow can be defined as follow:

box-shadow: 3px 2px 7px #888888, 0 0 4px #008800;

Versions before 1.0.10 would skip the comma after the first color, as shown below, rendering the whole declaration useless.

box-shadow:3px 2px 7px #8880 0 4px #080;

Download right here: https://sourceforge.net/projects/csspp/files/

Project here: CSS Preprocessor tool and library

csspp 1.0.9 published

I pusblished a new version of CSS Preprocessor (csspp) because 1.0.8 had one fix from Coverity when there were 4 such bugs total. 1.0.9 includes the other 3 fixes. It was a missused & operator (the parenthesis were missing.)

Version 1.0.9 is otherwise pretty much the same as 1.0.8, I applied a few other clean ups and updated the copyright notice to 2016. The library will soon be 1 year old!

Download right here: https://sourceforge.net/projects/csspp/files/

Project here: CSS Preprocessor tool and library

csspp 1.0.8 published

The csspp compiler was updated after being scanned for potential problems by Coverity.

Coverity found one potential buffer overflow in the lexer. This was certainly not possible to reach because that specific function is private and only used for a very few characters. But it is always worth fixing such bugs.

There are two other small issues: a compiler was created with 'this' as parameter instead of 'true' and a test misused the & operator.

So, as an end user you will probably not see any difference between 1.0.7 and 1.0.8.

Download right here: ...

csspp 1.0.7 published

The CSS specification clearly says that the CSS language itself is case insensitive. Unfortunately, it will be applied to data representing things such as the name of a class which is case sensitive. For this reason, it is important for csspp to keep input identifiers in the same case as it is found in the input file.

Version 1.0.7 includes that fix with tests used to verify that the code matches as expected.

Note that csspp still transforms function names to lowercase. This can cause problems with CSS used for Internet Explorer older versions (6 and earlier, versions that are not supported ...

csspp 1.0.6 published

Got CSS Preprocessor version 1.0.6 published.

This fixes a crashing problem with the minus operator (the following: "field: -;" crashes version 1.0.5 and earlier.) But that was not the point, just a side effect of writing many more tests.

The new system supports the @return at-command which means user defined functions work.

I wrote the necessary tests to check the system defined external functions. They all get checked. The result is that a couple were moved to internal functions so they would work (unique_id() and percentage() which cannot otherwise be implemented) and I added ...

The CSS Preprocessor adds the capability to write complex expressions and functions to use in your CSS files.

One of the functions you can use is a system function named if. It is used to select one of two expressions as shown here:

if($color = white, 33px, 145px)

This says if $color represents the color white, then use 33px, otherwise use 145px.

This works great in all cases where the true and false expressions are both calculable. If one of the expressions is to generate an error, then the if() function cannot be used. In this case, you want to use the ?: operator instead.

In the ...

csspp 1.0.5 published

The first version of csspp which with 100% coverage tests is now out. The .tar.gz is not yet available because SourceForge.net still has a few problems... but you can grab the source from the GIT repository.

The library (and thus command line tool) include support for a very large number of internal functions, variables, user defined functions (without support for the @return yet), nested rules, nested attributes, C/C++ like expressions, arrays, maps, color operations, etc.

The expression support the following types:

  • Integer (numbers without a period)
  • Decimal number
  • ...

I looked around for a while and completely missed the fact that SASS actually offers an extension to compile CSS files from a C++ library. That being said, it was not really clear whether the feat still requires the Ruby scripting language running in the background. If so, I think that my solution: CSS Preprocessor, is going to be a lot faster and possibly easier to maintain long term.

Yes. The CSS Preprocessor project reads .scss files (i.e. files mostly compatible with SASS) and compiles them in CSS 3 that your browser can handle. Not only that, it will minify those files as much as ...

Syndicate content Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly