Stacks - Theme Style not being Applied

Permalink 1 user found helpful
Theme - Elemental with custom preset styles - fonts and type color
C5 5.7.4.2

I am using a the Stack Popover Block. I can do the styling for the popover in the block custom design interface - that is - padding and background color. However, the typeface in the Stack content reverts to Elemental Bootstrap.
I am assuming, as the Stack is separate from the page design, and the Stack Popover Block is also separate from the page design, that I will have to create a custom design class? Or is there some other way that I can style this stack to match my theme presets?

arlenesey
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi arlenesey,

A straight forward approach is to find an existing selector in the Stack PopOver block to target. You would put the CSS in your theme main.less file or in Custom CSS.
arlenesey replied on at Permalink Reply
arlenesey
Thank you Mr Dilkington!

This worked, but a word of caution - I had to list each instance of the popover in the css - it is given a number. I assume that is so one can style different popover blocks in different ways.

Thanks for that quick reply.
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
Using the demo page to look for selectors, I found #stack-popover as the parent selector.
http://www.4concrete5.com/concrete5-addons/stack-popover-concrete5-...

For the numbered classes, you can target them all using an attribute selector.

Example:
#stack-popover .intro-cta {
    background: lightblue;
}
#stack-popover p {
    color: red;
}
/*#stack-popover-content-1929
- the id starts with "stack-popover-content"
*/
#stack-popover [id^="stack-popover-content"] {
    background: red;
}

For more information on attribute selectors:
https://css-tricks.com/attribute-selectors/...
https://css-tricks.com/almanac/selectors/a/attribute/...
arlenesey replied on at Permalink Reply
arlenesey
Wow! I never knew about that! I know you have handed me the solution, but I will need some time to digest all this. I was just getting used to ".less".
Now there's more! lol

Thank you for sharing.
-Arlene