Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
  #1  
Old 09-12-2012, 08:02 PM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Why isn't additional.css over riding the default css?

Ok so I'm trying to help someone at vbulletin.com change the back ground color of the font and size drop down boxes in the editor (version 4.1.x). With some help from Wayne I found the relevant css file to poke around in, /clientscript/ckeditor/skins/kama/editor.css

So I changed the color in the file itself and checked on my test site and it works (the back ground color changed). So then I added the code to additional.css but it doesn't work (the back ground color doesn't change).

Why?

Original code
Code:
.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{
  border-color: #316ac5;
  background-color: #dff1ff;
}
Code used in additional.css
Code:
.cke_panel_listItem a:hover,.cke_panel_listItem a:focus,.cke_panel_listItem a:active{
  border-color: #316ac5;
  background-color: #000000 !important;
}
It gets even stranger, I can change the color of the back ground for the drop down arrows for those boxes.

Original code
Code:
.cke_skin_kama .cke_rcombo .cke_off a:hover .cke_openbutton,.cke_skin_kama .cke_rcombo .cke_off a:focus .cke_openbutton,.cke_skin_kama .cke_rcombo .cke_off a:active .cke_openbutton,.cke_skin_kama .cke_rcombo .cke_on .cke_openbutton{
  border-color: #316ac5;
  background-color: #dff1ff;
}
Code in additional.css
Code:
.cke_skin_kama .cke_rcombo .cke_off a:hover .cke_openbutton,.cke_skin_kama .cke_rcombo .cke_off a:focus .cke_openbutton,.cke_skin_kama .cke_rcombo .cke_off a:active .cke_openbutton,.cke_skin_kama .cke_rcombo .cke_on .cke_openbutton{
  border-color: #316ac5;
  background-color: #000000 !important;
}
Reply With Quote
  #2  
Old 09-12-2012, 08:44 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

They may have some other CSS which is overriding the changes. It's hard to know without a link to the site.
Reply With Quote
  #3  
Old 09-12-2012, 09:26 PM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's my test site which is a vanilla 4.1.12 PL2 on my localhost so I can't link to it

I just thought it was odd that something could override additional.css.
Reply With Quote
  #4  
Old 09-13-2012, 02:23 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It shouldn't. But, it could be something else. Are you using firebug to find out what CSS is really effecting it?
Reply With Quote
  #5  
Old 09-13-2012, 03:20 AM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Firebug won't work in the drop down menus in the editor (right click does nothing).

I did however find the exact same default code in /clientscript/ckeditor/skins/kama/panel.css (why on earth it's in 2 different files I have no idea). According to Firebug both css files (editor.css and panel.css) are called (I didn't know the ckeditor was in an iframe ).

It still doesn't answer why additional.css isn't working.
Reply With Quote
  #6  
Old 09-13-2012, 03:46 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, firebug does work in dropdowns - I use it all the time.

The CSS for the ckeditor may be called after the additional.css file is called.
Reply With Quote
  #7  
Old 09-13-2012, 05:45 PM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I agree Firebug can work in drop down menus, however it does not work (via right click) in the editor drop down menus for "font" and "size". At first I thought it was a bug with my install, however right clicking those drop downs at vbulletin.com has the same results ... nothing happens However it does work here now that is very odd.

In regards to the css being called after addtional.css, how would I go about checking that? I don't recall seeing a reference to additional.css in Firebug.
Reply With Quote
  #8  
Old 09-19-2012, 07:36 PM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok after checking the manual additional.css is called in the headinclude_bottom template. I'm guessing the reason it's being over ridden by the default css is that the ckeditor is in an iframe and calls the 2 other css files within the iframe?

If this is the case, does anyone have any ideas how to bypass the default code without directly editing the css files?

Also to make sure I'm not complete crazy, would someone with firebug visit vbulletin.com and in ckeditor right click the "font" and "size" boxes and see the option to view element in firebug is there?
Reply With Quote
  #9  
Old 09-19-2012, 10:15 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by John Lester View Post
Also to make sure I'm not complete crazy, would someone with firebug visit vbulletin.com and in ckeditor right click the "font" and "size" boxes and see the option to view element in firebug is there?
I have the same problem - when I right-click on those, nothing happens. But if you right click on the text area then use the html window (in firebug) to go back and find the html for the drop-downs, you can get to them that way.
Reply With Quote
Благодарность от:
John Lester
  #10  
Old 09-19-2012, 10:51 PM
John Lester John Lester is offline
 
Join Date: Nov 2004
Posts: 543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I also found (just now) that if you leave the cursor in the "font" and "size" boxes and press F12 it opens up firebug

I'm thinking since the editor is in an iframe I can't tweak the css with additional.css because the default css is called in the iframe which is called after additional.css Oh well time to edit files then XD
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 06:23 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04498 seconds
  • Memory Usage 2,246KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete