Quick update: Better way to do this. You can use the .style + html tag format to target text.
So, ".stylename p" would let you apply, say, a lineheight property to any paragraph text to which you've applied that custom css, .stylename p h1 would let you target p & h1, etc.
Not sure why I didn't think this was workign at first, but there you go.
------------------------------
Adam Miller
Digital Corporate Content Manager
Visit CaliforniaUnited States
------------------------------
Original Message:
Sent: 08-02-2023 19:41
From: Adam Miller
Subject: Using theme styles in custom code & targeting text styles with custom css
Thanks Elena for more or less confirming that limitation of the code blocks. My sense is outside of the one-off table or whatever, code blocks are best used for creating whole pages or even sites, rather than plugging holes (after a point, just create a non-Flex site really).
Regarding the CSS, I've determined a VERY SPECIFIC workaround for applying lineheight (and I imagine many other text styles): The Flex editor will not let you apply a dot style (as best I can tell), but it will let you apply a text style to a paragraph or heading tag (p, h1, h2, etc.). So, what you can do is change the "HTML Heading Tag" of the texrt object to H6, which you're probably not using anywhere, and then target h6 in the Custom CSS tool. That will work. You do have to be sure you're not accidentally targeting an h6 somewhere else, but it's unlikely.
Maybe this helps someone.
------------------------------
Adam Miller
Digital Corporate Content Manager
Visit CaliforniaUnited States
Original Message:
Sent: 08-02-2023 19:22
From: Elena PEREZ
Subject: Using theme styles in custom code & targeting text styles with custom css
I believe you're correct that those classes don't automatically carry over to a custom code block. This feels like something that, while you could do it with a new CSS block like you mentioned, it would be better if this could be fixed globally so that if you've taken the time to set up CSS, it will carry through everything as opposed to having to be recreated.
I haven't hit the other issue you mention, but I wouldn't be surprised if certain settings weren't editable. If so, it would be good to have this stated somewhere in a knowledge base article or something so we know what's customizable and what isn't.
------------------------------
Elena PEREZ
Communications Coordinator
SEIU - UHWUnited States
Original Message:
Sent: 07-17-2023 19:39
From: Adam Miller
Subject: Using theme styles in custom code & targeting text styles with custom css
Two interrelated questions:
- Is it possible to use a flex site's theme styles/classes within a custom code block? By default, if you use, say, an <h4> tag in your custom code, it will not adopt the styles of your theme's h4, meaning you have to redefine them in a CSS block. This of course is problematic, because if you change a theme style, you now have to update your code style to match.
- I'm finding it impossible to apply some basic text styles using the CSS insertion. For example, I want to increase the line-height property of paragraph text. Defining a style does nothing; the only way I can get this to do anything is by redefining the p style within my CSS, but then of course it applies to everything, not just the targeted block of text. Seems like in the CSS hierarchy, my custom style is actually not at the most local -- it's being overridden by some site-wide default.
#AttendeeHub
------------------------------
Adam Miller
Digital Corporate Content Manager
Visit CaliforniaUnited States
------------------------------