Skip to content

Option to override "!important" #88

Open
@yoannisj

Description

@yoannisj

Sometimes you may want to override css "!important" font-size rules. This can be done by replacing the resizer function by the following :

var resizer = function () {
      var fontSize = Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize));
      $this.attr('style', 'font-size: ' + fontSize + 'px !important');
};

The reason I wanted to do this is because I use a utility class to set fallback font-sizes, and, being part of a css framework, that utility class needs the !important flag.

http://css-tricks.com/when-using-important-is-the-right-choice/

There are probably some other use cases but I think it would be best to implement it as an option though.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions