buunguyen / combres

ASP.NET and MVC performance optimization library ⛺
Other
123 stars 37 forks source link

dotLess strictMath mode not configurable #44

Closed oguzhankahyaoglu closed 8 years ago

oguzhankahyaoglu commented 8 years ago

dotless has a lot of configurable property but as far as i see, u implemented dotless support in filters (Commented code was yours):

    //private static readonly DotlessConfiguration Config = new DotlessConfiguration
    //{
    //    CacheEnabled = false,
    //    MinifyOutput = false
    //};

    private static readonly bool IsStrictMathEnabled = (ConfigurationManager.GetSection("dotless") as DotlessConfiguration).StrictMath;

    private static readonly DotlessConfiguration Config = new DotlessConfiguration
    {
        CacheEnabled = false,
        MinifyOutput = false,
        StrictMath = IsStrictMathEnabled
    };

You should have implemented a way to configure it. Strict math is a key feature, css syntax is improving and there is no way to use "calc" support without it. So, i had to enable it by modifying your code.

Thanks for improvements.

buunguyen commented 8 years ago

Would you mind submitting a PR for this?

oguzhankahyaoglu commented 8 years ago

you mean public reason? what is pr?

if you need a reason, it is your thought. i can go on with modified source code.

buunguyen commented 8 years ago

Sorry, I meant a pull request.

oguzhankahyaoglu commented 8 years ago

This was just a suggestion for you. Implementing or not is your decision because I dont have coherent knowledge about your project. So, i cannot take responsibility for that. This is just an idea.

I solved my problem just adding 2 lines to your source code. Further enhancements would be your decision.