Style for "new" Links is being overridden.

If you are having problems with GuMax, post here.
Post Reply
User avatar
whoiga
Rank 0
Rank 0
Posts: 3
Joined: January 17th, 2008, 6:59 pm

Style for "new" Links is being overridden.

Post by whoiga »

Hey Paul.

First of all, thanks for the great skin, it's brilliant.

I chose to do some tweaking and thus far have not run into any problems I couldn't solve.

However, my last tweak was to modify the "new" class links (for pages that haven't yet been created and such) so that they have the color #ff0000 and text-decoration: line-through.

This isn't the first time I've tweaked a Wiki skin, and so I made my appropriate changes to all involved .css files and then uploaded them. I then cleared my browser cache and (just in case) truncated the objectcache table of the database.

No matter what I try (and I've tried many things before deciding to post here), the "new" links retain their original style.

However, upon clicking them, viewing the "this page hasn't been created yet" spiel, and then going back via the browser or simply opening the site in another tab, window, or completely different browser, the links (only the ones I've clicked on) then take-on the style that I want them to have.

It's like the links are retaining their old style, and then once they are visited, they pick up their new style. I've tried everything available in my arsenal of web development knowledge and am at a complete loss for what else to try. I've even asked friends to view the site and describe links to me, of which they tell me the links are not the correct shade of red and do not have a line through them.

http://finance.martinpace.com/ -- Here is my Wiki.

At first I thought "Well, perhaps I only modified the style for :visited, and not for normal "new" links.", and so I revisited the files for searching and editing.

The incorrect color is #cc2200 and I cannot find any instance of that in any of the .css (or even the .php) files.

I've also found the #cc2200 in css files contained within the /monobook and /common directories, and I've changed them, uploaded them, cleared cache, and still... no result, so I no longer feel they're related to the problem.

This is frustrating because it's such a simple thing to do and yet I am unable to do it. This is really racking my brain. If you have any suggestions, I am all-ears.

Thank you in advance, Paul! Keep up the good work.
User avatar
Paul
Development Team Leader
Development Team Leader
Posts: 1132
Joined: October 20th, 2007, 2:23 pm

Re: Style for "new" Links is being overridden.

Post by Paul »

Most of the link style are in CSS file gumax_link_navigation.css, however, many default color that from wiki are still in main.css, which is from original skin. You might override the setting in main.css if you want to change the wiki default setting.


I keep the main.css in order to be easy for me to upgrade GuMax to new Wiki version :mrgreen: .
User avatar
whoiga
Rank 0
Rank 0
Posts: 3
Joined: January 17th, 2008, 6:59 pm

Re: Style for "new" Links is being overridden.

Post by whoiga »

Well that's the thing, hehe. I've modified every color and link style I could find in all of the CSS files included with your skin, and even the default CSS files, such as main.css as well as all of the IE & Opera Fixes CSS files.

My results are still the same - the links take-on the style whenever they "feel like it", for the most part.

It's like they're almost working but something is preventing them from working initially - I just can't seem to find out exactly what.
User avatar
whoiga
Rank 0
Rank 0
Posts: 3
Joined: January 17th, 2008, 6:59 pm

Re: Style for "new" Links is being overridden.

Post by whoiga »

Figured out the problem.

The problem is that whoever designed the Monobook skin (off of which your skin is based), did not properly define the classes and tags for links.

When one uses:

a {
example: blah;
}

as opposed to:

a:link {
example: blah;
}

They are defining a style rule for anchors only, and not links. (In most cases, defining a style for an anchor is pointless to begin with.)

The same goes for defining style rules for a specific class of that tag.

INCORRECT:
a.new {
example: blah;
}

CORRECT:
a.new:link {
example: blah;
}

It's not your mistake though, Paul. It's just how the main.css was originally designed.

Adding :link to the end of all instances of "a.new", even "#exampleID a.new" solved the problem very quickly.

Just thought I would share my findings. Thanks again for the great skin. I hope you like what I've done with it.
User avatar
Paul
Development Team Leader
Development Team Leader
Posts: 1132
Joined: October 20th, 2007, 2:23 pm

Re: Style for "new" Links is being overridden.

Post by Paul »

Excellect, man!

I never pay attention to that, since I just leave as default, which is OK for most of my skin. I'm so glad that you point out that trick, great work!

You are always welcome back and share with us :mrgreen: .
Post Reply