{
  "id": "search-term-highlight",
  "name": "Search Term Highlight",
  "category": "text",
  "tags": [
    "mark",
    "search results",
    "box-decoration-break",
    "forced colors",
    "accessibility"
  ],
  "description": "Rounded, readable styling for the mark element in search results, with a forced-colors fallback.",
  "url": "https://copy-css.com/snippets/search-term-highlight",
  "markdown": "https://copy-css.com/snippets/search-term-highlight.md",
  "html": "<p class=\"search-snippet\">Free <mark class=\"search-mark\">CSS</mark> snippets for buttons, loaders and <mark class=\"search-mark\">CSS</mark> grid layouts.</p>",
  "css": ".search-snippet {\n  max-width: 17em;\n  margin: 0;\n  color: #374151;\n  font: 400 18px/1.6 system-ui, sans-serif;\n}\n\n.search-mark {\n  padding: 0.05em 0.25em;\n  border-radius: 0.3em;\n  background: #fef08a;\n  color: #713f12;\n  font-weight: 600;\n  box-shadow: inset 0 -0.12em 0 #facc15;\n  -webkit-box-decoration-break: clone;\n  box-decoration-break: clone;\n}\n\n@media (forced-colors: active) {\n  .search-mark {\n    background: Mark;\n    color: MarkText;\n  }\n}",
  "features": [
    "box shadows"
  ],
  "customProperties": []
}
