gridstack.js icon indicating copy to clipboard operation
gridstack.js copied to clipboard

CSS !important

Open krilllind opened this issue 9 years ago • 2 comments

Subject of the issue

Multiple css rules is set to !important and becomes extremely hard to override.

Your environment

  • version of gridstack.js: 0.3.0
  • which browser and its version: All browsers (but tested in Chrome 61)

Steps to reproduce

Class-selector: .grid-stack > .grid-stack-item > .grid-stack-item-content has a z-index property of 0 !important;

Expected behaviour

Remove important attribute to make it more simple to edit the css.

Actual behaviour

Trying to override this property from a less "specific" selector, but this cannot be done. When exporting a lib for others to use, never specify a property with the !important attribute (it's always a bad thing to give a property the !important attribute).

krilllind avatar Oct 18 '17 09:10 krilllind

I've removed the !important from the rules in question and everything still seems to be running smoothly. Maybe the author @radiolips can shed some light on in this issue? :)

DnJealt avatar Oct 19 '17 08:10 DnJealt

Wish I could! I'm not sure who originally set that. Could one of you two @DnJealt @krilllind put in a PR to not use !important and I can test the branch out and make sure it's fine? I'm guessing whoever put it in was just a bit nervous.

radiolips avatar Feb 12 '18 20:02 radiolips