• Please do not add css rules with #ancr-... ..ancr-btn-primary { color: #000 !important}

    If you add ids and !important this cannot be overridden.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter dieppon

    (@dieppon)

    I have created a gist with the patch if anyone is using composer:

    https://gist.github.com/dieppon/93bf355eb8ffaa675bb8280a28d8303a

    Plugin Author vaakash

    (@vaakash)

    Hi @dieppon,

    This was an intentional change. There were issues reported where some styling were not effected in certain themes. Adding !important fixes this and does not cause any issue.

    Let me know if you have any solution or suggestion for this issue

    Thanks,

    Aakash

    Thread Starter dieppon

    (@dieppon)

    really? do you need to use a ID reference + .class + !important?

    There is no way to override this on a custom theme without patching the plugin.

    I pretty sure you can make it work without the use of !important.

    Plugin Author vaakash

    (@vaakash)

    Hi @dieppon,

    Yes, I’m aware of using !important. But note that this is a generic plugin which is supposed to work on any theme with various different styles. Often times I see issues reported where the color selected in the settings page is not in effect. The reason is, themes override it and users expect the style as they have chosen.

    If you are writing CSS when you are aware of the environment then you can adjust the CSS specificity as needed and not use !important tag. But when writing CSS for diverse scenarios like a plugin, I had to force the value. Removing that will raise issues even though the CSS specificity is high in one website or other.

    The idea is, anything marked !important is expected to be changed on the settings page. You can however customize other properties as needed using CSS.

    Thanks,

    Aakash

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘!important hardcode with php’ is closed to new replies.