Archived topic
Text Highlight option and CSS in Generateblocks
5 replies · Started by Natalie on May 29, 2020
I have stumbled across the 'highlight' option in generateblocks for highlighting a piece of text in a different colour.
I can't actually see it in the documentation anywhere and the option for setting the colour isn't mentioned on this page of the documentation:
https://docs.generateblocks.com/article/color-picker-overview/
It is shown on this page as an option for choosing the colour but no mention of how to 'mark' the text to be highlighted:
https://docs.generateblocks.com/article/headline-overview/
I have worked out now how to set the text as highlighted - it is in the dropdown-arrow for the block
It seems you can only set the highlight colour in a headline block. But you can actually set a piece of text in a paragraph as a 'highlight' but then there is nowhere to set the highlight colour for a paragraph. Is there something I'm missing here?
I also have a query about the default CSS you've included:
.gb-highlight {
background: unset;
color: unset;
}
As 'unset' doesn't work in IE would it be more consistent to use:
.gb-highlight {
background: inherit;
color: inherit;
}
Obviously not many people use IE so it would not affect many people.
Thanks
Hi there,
The option for the color is only in our Headline block, as we don't alter core blocks at all in the plugin (at least for now).
Thanks for the tip about unset! I'll take a look :)
Thanks Tom.
The option for the color is only in our Headline block, as we don’t alter core blocks at all in the plugin
Yes but haven't you altered the paragraph block by including the option to SET a selection of text as a highlight?
If you could choose the highlight colour for a container block then that could apply to the paragraph inside it?
Not a deal-breaker for me but just a bit confusing that you can mark as highlight but not set the colour.
Hmm GB shouldn't have the option to highlight in the regular paragraph block - I'll take a closer look at that, could be a bug.
Darnit, I was enjoying highlighting in paragraphs lol. This was working.
1.0.2: highlight option for a paragraph block is there and works.
1.1.0: highlight option for a paragraph block is gone.
1.1.1: highlight option for a paragraph block is gone.
1.1.2 (current version): highlight for a paragraph block option is gone.
Can you confirm this was a bug or shouldn't have been happening? It appears to have been removed/fixed in a recent update. I'll figure out another way to this. :)
Hey Brian,
Having the highlight option within other blocks was actually a bug. I'm surprised that it was working with regular paragraphs. Sorry about that! :)