Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #170026

    Hi,
    Is it possible to access the theme style colors from a custom CSS file?

    E.g.
    If the Theme styling has primary header colour of #f05a1a,

    then rather than my custom CSS saying
    color: #f05a1a

    it could I reference that directly in a custom CSS? So that a theme style change on the theme styling page would be propagated globally, rather than having to go around custom CSS files changing them manually?

    #170342

    Hi ChunkyBits!

    Sorry but I don’t understand what you mean. You can use the css > custom.css file to override any styling on the theme. You can use Enfold > Styling panel to apply automatic css changes but if you want to define a specific style on a certain element, you need to add it on the Quick CSS field or use the custom.css file.

    Cheers!
    Ismael

    #170373

    OK, I will try to explain it another way.

    I use the FullCalendar plug-in, and the default background of the header above the calendar is white – this doesn’t match my Enfold custom theme styling. So, I use some custom CSS to change this background to match that of the enfold theme background of the page where the calendar is instantiated.

    I use the following CSS code, where the #f8f8f8 is the colour specified by my Enfold theme-styling Main Content Background color.

    .fc-header-left {
    background-color: #f8f8f8 !important;
    }

    This works great. Now, if I decide to change my Enfold theme styling color in the Enfold settings tab, from #f8f8f8 to say #e0e0e0, then I would need to remember to also manually change the colours specified my custom CSS file from #f8f8f8 to #e0e0e0.

    So, the question is, can I reference the Enfold theme styling colour/variable/definition directly? E.g. to change my CSS to something like….

    .fc-header-left {
    background-color: $get_enfold_alt_back_color !important;
    }

    As this way, any theme styling change made in the Enfold theme-tab, would automatically propgate to any custom changes I’ve made in the custom CSS.

    Thanks

    #171334

    Hey!

    No, not that I can think of. CSS doesn’t have variables yet for that kind of thing and you adding it into the framework would make the theme updates manual moving forward.

    Regards,
    Devin

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Accessing Theme style colours from custom CSS.’ is closed to new replies.