Do you use any HTML or CSS pre-processor? Why?

4 years ago from Bruno Abatti, Graphic Design student.

  • Michael Ortali, 4 years ago

    It depends.

    As the name states: adding a pre-processor means you will add latency into your workflow.

    At first it takes milliseconds, but as your application grows, it can take seconds then minutes to complete. Every time you will want to preview a change, the system you are using will have to pre-process the code into something the browser can understand.

    Before using a pre-processor, the best is always to assess the issues you are facing. For instance with "classic" CSS:

    • How do you automatically support vendor properties?
    • How do you support namespaced classes?
    • How to quickly change a primary action color?
    • How do you share sets of properties?

    By assessing the issues you are facing, you will be able to see whether or not to use a specific pre-processor. Now to answer to your question, I use Sass as a CSS preprocessor because the benefits outweigh (syntax is closed to CSS, modularization, shared variables, namespacing, vendor properties, functions). There are others (stylus, less) which provide similar features.


    Note: I don't use a HTML pre-processor.

    0 points