Register Members List Search Today's Posts Mark Forums Read

Thread Tools
Old 01 Nov 2013, 12:05
Lichurec Lichurec is offline
Join Date: Oct 2013
Lightbulb Theme custom css in vB5


1) Is there a way to load a custom css (or - preferably - css_additional.css) as a LAST one, so that no other css file can overwrite it's properties?

By default the css_additional is loaded before css_editor (and few other) what makes styling the editor look kinda pesky :/

2) Also - could someone please tell me how come the forum re-applies some styles on some user actions? For instance: editing a forum post (just clicking the "edit" link) results in re-applying some button styles as if their "original" css was re-attached at the end of the document.

Reply With Quote
Old 04 Nov 2013, 17:28
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Join Date: Jan 2002
Real name: Wayne
1) Editor is loaded on demand so difficult to use css_additional.css after it. Use !important or edit the ckeditor CSS directly.

2) Javascript can change the CSS class when an action takes place. You'll need to look at your developer tools and look at the class interactions.
Wayne Luke
Get started with your own social network. Purchase and download vBulletin today.
Reply With Quote
Old 04 Nov 2013, 17:42
Lichurec Lichurec is offline
Join Date: Oct 2013
1) "!important" is not a solution, especially that "css_editor" alone includes declarations with !important which therefore you can not overwrite. In order be able to custom-style the templates one has to be sure that his "customised CSS" WILL be loaded as the very last.

2) in this case JS does not add additional classes. I managed to track down the issue and - from my perspective - it's an error which I can not bypass in any reasonable way.
The contententry template includes <script type="text/javascript"></script> block at the very end. Apparently - rendering this template (which happens if one tries to "edit" someone's post) renders blocks full of <link rel="stylesheet">in place of the script block.

This forces the browser to try to re-download those CSS templates (which it should not do, hence they're already in the browser cache) AND re-render whole page keeping in mind new order of css files ("new" files / files linked lower in the code list will become "more important" and override style declarations from any files loaded / linked earlier).

What's interesting - it's sufficient to have an empty <script type="text/javascript"></script> block in mentioned template for this behaviour to occur… :/

Rendered code looks like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Last edited by Lichurec; 04 Nov 2013 at 18:06.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

New To Site? Need Help?

All times are GMT. The time now is 03:11.

Layout Options | Width: Wide Color: