How to add under highlight to text in css

Issue #701

Use mark. This does not work for multiline

<p>
    <mark css={css`
        display: inline-block;
        line-height: 0em;
        padding-bottom: 0.5em;
        `}>{feature.title}
    </mark>
</p>

Another way is to use background

.highlight {
  background: linear-gradient(180deg,rgba(255,255,255,0) 50%, #FFD0AE 50%);
}

Read more


Updated at 2020-11-20 05:23:59

Written by

I’m open source contributor, writer, speaker and product maker.

Start the conversation