Style-Scripts

From OpenFOAMWiki

Can the text colours be upped a bit on the black ink? I do agree that high contrast text is a pain for the eyes, but too little contrast is also bad :(

Wyldckat (talk)11:59, 8 November 2014

You mean something like

p {
  color: rgb(50,50,50);
}

instead of the current

p {
  color: rgb(119,119,119);
}

To try it out you can use the developer tools built into Firefox. In the "Style"-tab (sorry. My Firefox speaks German so I've got to guess the translation) on top of the list of the included style-sheets there is a "New". After pressing that there is a text-pane where one can add CSS (just copy/paste the above)

I like the idea behind the original CSS to keep the main text light because that way emphasis is more visible. But your opinion is valued. Is 50 enough? I'd still like the text to be lighter

Bgschaid (talk)13:20, 8 November 2014

I wouldn't say 50, but 80 seems to the right amount.

 
p {
  color: rgb(80,80,80);
}

Although I couldn't figure out in which CSS the paragraphs were defined... probably was looking at the code too fast :(

By the way, where can we edit our personal CSS styles? All I could find were the generic ones:

  • Chameleon (default | Preview)
  • Chick (Preview)
  • MySkin (Preview)
  • Nostalgia (Preview)
  • Simple (Preview)
  • Standard (Preview)
  • bootstrapskin (Preview)

or did I interpret the news incorrectly or even dreamed about reading them?

Wyldckat (talk)13:34, 8 November 2014

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page:

Return to Thread:Talk:Main Page/Style-Scripts/reply (4).

I should have looked for the news page again :(

How about having a dummy point on the template for allowing a user-side chosen Javascript to be placed there automatically, which would change the CSS on the client's side only? The Javascript could be something like as follows, which is something I have as a compressed form as a bookmark:

function() {
    var newSS, styles = '* { background: #E9E9E9 ! important; color: #000000 !important } :link, :link * { color: #3333EE !important } :visited, :visited * { color: #551A8B !important }';
    if (document.createStyleSheet) {
        document.createStyleSheet("javascript:'" + styles + "'");
    } else {
        newSS = document.createElement('link');
        newSS.rel = 'stylesheet';
        newSS.href = 'data:text/css,' + escape(styles);
        document.getElementsByTagName("head")[0].appendChild(newSS);
    }
})();

But I guess the template doesn't allow for this kind of hacking :(

Anyway, if and when I get annoyed with the colouring, I'll share a bookmark here for quickly changing only the text colours, since it's hard to please everyone ;)

Wyldckat (talk)16:28, 8 November 2014

I guess if the user wants this kind of hacking he will use something like the GreaseMonkey-extension anyway. That way he doesn't have to rely on the goodwill of the server administrator.

Bgschaid (talk)14:25, 11 November 2014
 
 

The slighly darker value has now been added for the main text

Bgschaid (talk)14:27, 11 November 2014

Sorry for the late reply, but lists weren't affected by this change :(

For example, see this section: FAQ/General#Where_is_FoamX.3F

Wyldckat (talk)11:21, 30 November 2014

I'll have a look

Bgschaid (talk)14:13, 30 November 2014

Hi Bernhard,

OK, lists are still in a different colour:

  • Here is an example with a different colour...
  1. And another example

But now I bring more details on another issue, where the first line of code blocks are too much to the left, as shown here: Contrib_blockMeshDG#Download

The reason for this is because the css entry ".mw-body ul" from the stylesheet file from here:

http://openfoamwiki.net/load.php?debug=false&lang=en&modules=ext.bootstrap.styles&only=styles&skin=chameleon&*

has this:

text-indent: -2ex;

it's looks to me that this indentation can be removed, since it's doesn't affect much... oh, it's because of the Main Page...

Curiously enough, ".mw-body ol" has this same indent parameter set to "0".

And it seems that these are also the entries that need the colour update. If I'm not mistaken, we can fix all of these issues if you change this:

.mw-body ol {
    text-indent: 0;
}
.mw-body ul {
    list-style: outside none none;
    text-indent: -2ex;
}

To this:

.mw-body ol {
    text-indent: 0;
    color: #505050;
}
.mw-body ul {
    list-style: outside none none;
    text-indent: 0;
    color: #505050;
}

.panel-body ul {
    text-indent: -2ex;
}

Best regards,
Bruno

Wyldckat (talk)00:54, 4 April 2015