Child Theme style-light.css
-
Is it possible to do the same with the
style-light.css
file. I’d like to change the font color of the top menu descriptions (on hover). By default, it is pulling the font color from thestyle-light.css
file.Can I do the same in a child theme? I’ve already attempted, but unsuccessfully.
I just made a new .css file, titled it
style-light.css
, and put it in my child theme folder.Here is the code of the file:
@import url("../graphene/style-light.css");
#header-menu > li:hover > a > span, #header-menu > li.current-menu-item > a > span, #header-menu > li.current-menu-ancestor > a > span {
color: #C7F9FB;
}It won’t change the font color.
Suggestions?
AdminNope it won’t, cause that
style-light.css
file in your child theme won’t be automatically loaded. Remember that only certain files will be automatically loaded in a child theme.Try adding this to your child theme’s
functions.php
file:function graphene_extra_styles(){
wp_enqueue_style( 'graphene-child-light', get_stylesheet_directory_uri() . '/style-light.css' );
}
add_action( 'wp_print_styles', 'graphene_extra_styles', 1000 );You are unbelievable!
So, if the situation arises in the future, I can use this file just like the child stlye.css file?
AdminSure you can, though I’m not sure if you need this line:
@import url("../graphene/style-light.css");
The parent theme would have already loaded its own
style-light.css
file if you enable the light header bars option.You’re right. I took it out and the changes remained effective.
Thanks so much. I wish I knew what all that meant… but it’ll make for some good reading while I’m on vacation next week 🙂
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.