{"componentChunkName":"component---src-templates-tailwindclass-js","path":"/tailwindcss/classes/tailwind-text-decoration-thickness/","result":{"data":{"site":{"siteMetadata":{"title":"Resources to help developers | Contrast | Devwares","docsLocation":""}},"mdx":{"fields":{"id":"3ad595f8-8f83-52d2-a80b-4c6738427197","title":"Tailwind CSS Text Decoration Thickness","slug":"/classes/tailwind-text-decoration-thickness/"},"body":"var _excluded = [\"components\"];\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nfunction _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }\n/* @jsxRuntime classic */\n/* @jsx mdx */\n\nvar _frontmatter = {\n  \"lastUpdated\": \"8 May 2024\",\n  \"title\": \"Tailwind CSS Text Decoration Thickness\",\n  \"metaTitle\": \"Tailwind CSS Text Decoration Thickness\",\n  \"metaDescription\": \"The text-decoration-thickness utility class in Tailwind CSS allows you to control the thickness of text decorations such as underline, overline, and line-through.\",\n  \"canonicalUrl\": \"https://windframe.dev/tailwind/classes/tailwind-text-decoration-thickness\"\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n    props = _objectWithoutProperties(_ref, _excluded);\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h1\", null, \"Tailwind Text Decoration Thickness\"), mdx(\"p\", null, \"The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"text-decoration-thickness\"), \" utility class in Tailwind CSS allows you to control the thickness of text decorations such as underline, overline, and line-through. With Tailwind's text-decoration-thickness class, you can easily adjust the thickness of these text decorations.\"), mdx(\"h2\", null, \"Applying Text Decoration Thickness\"), mdx(\"p\", null, \"To apply text decoration thickness to an element, you can use the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"decoration-{width}\"), \" utility class, where {width} represents the desired thickness value. Here are the some available thickness options:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"decoration-auto: Applies the default thickness of the text decoration (default).\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"decoration-0: Applies a thin thickness to the text decoration.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"decoration-8: Applies a thick thickness to the text decoration.\")), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-html\"\n  }, \"<p class=\\\"decoration-4 underline\\\">\\n  This is an underlined text with a 4px thickness.\\n</p>\\n<p class=\\\"decoration-2 underline\\\">\\n  This is an underlined text with a decoration thickness of 2px.\\n</p>\\n\")), mdx(\"h2\", null, \"Preview\"), mdx(\"div\", {\n    className: \"relative rounded-xl overflow-auto bg-red-50 p-8\"\n  }, mdx(\"div\", {\n    className: \"flex flex-col gap-8 text-red-500\"\n  }, mdx(\"div\", {\n    className: \"text-lg font-medium underline decoration-4\"\n  }, \"This is an underlined text with a 4px thickness.\"), mdx(\"div\", {\n    className: \"text-lg font-medium underline decoration-2\"\n  }, \"This is an underlined text with a decoration thickness of 2px.\"))), mdx(\"h2\", null, \"Responsive Text Decoration Thickness\"), mdx(\"p\", null, \"Tailwind CSS allows you to apply text decoration thickness classes responsively at different breakpoints. To use responsive text decoration thickness classes, you can append the breakpoint prefix to the utility class. For example, md:decoration-1 applies a thin thickness to the text decoration starting from the medium breakpoint and above.\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-html\"\n  }, \"<p class=\\\"decoration-4 md:decoration-1 underline\\\">\\n  This text has a thick underline by default, but the thickness changes to thin on medium screens\\n  and above.\\n</p>\\n\")), mdx(\"p\", null, \"In the above example, the text has a thick underline by default (\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"decoration-4\"), \"), but starting from the medium breakpoint and above, the thickness changes to thin (\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"md:decoration-2\"), \").\"), mdx(\"h2\", null, \"Tailwind Text Decoration Thickness Class Table\"), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Class\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Properties\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"decoration-auto\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"text-decoration-thickness: auto;\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"decoration-from-font\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"text-decoration-thickness: from-font;\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"decoration-0\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"text-decoration-thickness: 0px;\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"decoration-1\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"text-decoration-thickness: 1px;\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"decoration-2\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"text-decoration-thickness: 2px;\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"decoration-4\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"text-decoration-thickness: 4px;\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"decoration-8\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"text-decoration-thickness: 8px;\")))), mdx(\"h2\", null, \"Windframe Tailwind Blocks\"), mdx(\"p\", null, mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://app.windframe.dev/editor?id=header17\"\n  }, \"Landing page\")));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#tailwind-text-decoration-thickness","title":"Tailwind Text Decoration Thickness","items":[{"url":"#applying-text-decoration-thickness","title":"Applying Text Decoration Thickness"},{"url":"#preview","title":"Preview"},{"url":"#responsive-text-decoration-thickness","title":"Responsive Text Decoration Thickness"},{"url":"#tailwind-text-decoration-thickness-class-table","title":"Tailwind Text Decoration Thickness Class Table"},{"url":"#windframe-tailwind-blocks","title":"Windframe Tailwind Blocks"}]}]},"parent":{"__typename":"File","relativePath":"classes/tailwind-text-decoration-thickness.md"},"frontmatter":{"githubUrl":null,"metaTitle":"Tailwind CSS Text Decoration Thickness","lastUpdated":"8 May 2024","metaDescription":"The text-decoration-thickness utility class in Tailwind CSS allows you to control the thickness of text decorations such as underline, overline, and line-through."}}},"pageContext":{"id":"3ad595f8-8f83-52d2-a80b-4c6738427197"}},"staticQueryHashes":["2619113677","2619113677","2619113677","2619113677","2619113677","2619113677","2619113677","2619113677","3309287076","3309287076","3706406642","3706406642","3706406642","4045616534","4045616534","956403285"]}