Skip to content
Discussion options

You must be logged in to vote

Yes, there are several ways to make automatically marked text more readable while keeping the standard CSS theme. Here are some strategies:

  1. Use Contrasting Colors
    Ensure the marked text has a background and text color that contrast well. For example:

mark {
background-color: yellow; /* Light background /
color: black; /
Dark text */
}

  1. Change Font Style or Weight
    Modify the font weight or style to make the marked text stand out:

mark {
font-weight: bold;
font-style: italic;
}

  1. Add Padding or Border
    Create space around the marked text or add a border for better visibility:

mark {
padding: 0 2px; /* Horizontal padding /
border: 1px solid lightgray; /
Subtle border /
border-radius: 3px; /

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Don-Swanson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants