!important will get you out of a jam, particularly when you want to override something that is set in an Action or is styled inline:
<div id="foo" style="width: 100px">...</div>
Ordinarily, if you wanted this to be anything other than 100px wide, you would have to reach into the code (which Freeway won’t let you do) and change it there. That’s because the inline style is the “court of last resort” when it comes to CSS. But if you have a stylesheet or a style block in the head of the page, and you add !important to the width property, that will override even this ultra-specific definition.
The trouble with !important is that it becomes a nuclear arms race. Once you set one thing up with it, you won’t be able to change that value again. There’s no such thing as !important !important, or !extra-important.
The reason that this article is suggesting you don’t want to go down that road is that having to use it at all is a “code smell” – it means that you did something too forceful earlier, and now there’s no place left for you to turn. Sometimes in Freeway, it’s all you can do, but if you are building up your styles by hand, and relying on the CSS cascade to build up complex behavior out of many, simple rules, then you should look at all the rules that apply to that object, and see if one of them is way too specific. It’s good advice.
Walter
On Jan 10, 2014, at 8:04 AM, RavenManiac wrote:
New question.
The online CSS instructor stated that whenever possible you should avoid using the !important declaration and try to resolve the CSS conflict through normal means. I’ve noticed that a lot of more advanced FWP forum members tend to use the !important command. Why is that?
offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options