- This topic has 7 replies, 3 voices, and was last updated 2 years ago by Ying.
-
AuthorPosts
-
March 29, 2022 at 6:24 pm #2171780William
Aloha π
Do you all have a secret CSS style that targets the “Before text” in Headline/Post Meta block?
It’s a bit beyond my skill level.
I just want to bold and color if possible π
Example: https://cssopps.flywheelsites.com/internships/partners-in-development-foundation/
Much thanks as always!
-Bill
March 29, 2022 at 7:02 pm #2171799Fernando Customer SupportHi Bill,
You may achieve this through the following steps.
1. Change the font-weight and color of the Block in the Editor: https://share.getcloudapp.com/qGu7Xx2O
2. Then add Class:my-modify-text
: https://share.getcloudapp.com/o0uREX5o
3. Then add this custom CSS code in Appearance > Customize > Additional CSS:.gb-headline.my-modify-text > *{ color:rgb(0, 0, 0); font-weight:normal;; }
Kindly modify
rgb(0,0,0)
to your preferred color: https://www.w3schools.com/colors/colors_picker.aspEnd result: https://share.getcloudapp.com/YEurXW5n
Hope this helps! π
March 30, 2022 at 10:05 am #2172744WilliamWOW!! Thanks Fernando!
So you’re leveraging the Editor style’s ‘power’ over the Customizer CSS rule to your advantage?
I would never have gotten that!! π
Two follow-ups:
1) Is there any way to ‘reverse’ the rule? … ie. the CSS controls the ‘Post before’ text rather than the Editor.
2) The CSS rule wipes my link style (color and underline) … any way to get CSS control back?
Hover over Organization: Honolulu Complete Streets here: https://cssopps.flywheelsites.com/internships/honolulu-complete-streets/
I tried setting link color in Editor, but no luck there.
-bill
March 30, 2022 at 10:46 am #2172788YingStaffCustomer SupportHi William,
I don’t think there’s a good way to style the before text.
I can only think of the ones with a link, so the CSS could be:
.gb-headline.my-modify-text > *:not(a){ color:rgb(0, 0, 0); font-weight:normal;; }
But for text only ones, it’s impossible to target.
If different style is really important, then I would recommend using the
inline-width
for the meta field text and before text, see the example below:
https://www.screencast.com/t/0fvSp7qGlMarch 30, 2022 at 3:10 pm #2172946WilliamAloha Ying,
I wrapped the Before text in a ‘strong’ tag – then styled the strong tag π
Example: https://ibb.co/Jz1kV6t
Would you strongly advise against this?
It seems to work π
https://cssopps.flywheelsites.com/internships/honolulu-complete-streets/
Thank you!!
-bill
March 30, 2022 at 3:17 pm #2172953YingStaffCustomer SupportI wrapped the Before text in a βstrongβ tag β then styled the strong tag
That’s a genius move π
Would you strongly advise against this?
Why would I? I learnt some smart trick from you π Thanks!
March 30, 2022 at 3:20 pm #2172956WilliamI taught you something!??!?
OMG – I can RETIRE now!! π
You made my day – Thanks Ying!
You the best!
-bill
March 30, 2022 at 3:27 pm #2172960YingStaffCustomer SupportYou made my day too!
I just said it’s impossible to target, and then you came up with this smart little idea! Love it π
-
AuthorPosts
- You must be logged in to reply to this topic.