Typography
Provides a variety of globally scoped typographic styles. Keeps common tags styled consistently throughout an app.
Opt-In Typography
New in v1.5+Please review the new changes for Skeleton's typography system.
Starting Skeleton v1.5+ we've introduced a new opt-in typography system that will replace the on-by-default system of prior versions. This allows you to choose which elements receive Skeleton's typography via utility classes, similar to Skeleton's form styles.
Headings
Paragraph
Anchor
Blockquote
Pre-formatted Text
Code
Keyboard
Insertion / Deletion
Using the Tailwind Plugin
Tailwind provides an official plugin to automatically style HTML you do not control, such as CMS or blog content. Follow Tailwind's official instructions to install and configure this plugin within your project. You may then set or adjust the modifiers for each element. Skeleton provides a few default adaptive theme styles for common prose elements, such as: headings, paragraphs, and anchors. See the instruction provided below.
Method 1: Inline Utility Classes:
<article class="prose lg:prose-xl prose-code:bg-purple-500"></article>
Method 2: Global Stylesheet Overrides
<article class="prose lg:prose-xl"></article>
/* Set the following in /src/app.postcss */
.prose {
/* Modifying the H1 tag modifiers */
@apply prose-h1:text-3xl prose-h1:md:text-5xl;
/* Modifying the CODE element modifiers */
@apply prose-code:bg-purple-500;
}
When overriding existing styles you may need to use !
to set important, such as
prose-code:!bg-purple-500
Excluding Styles
DeprecatedThis exemption class is only relevant when using on-by-default typography rather than the opt-in system. This is slated for deprecation and will be dropped in Skeleton v2.x+.
Use the .unstyled
class to exclude and reset Skeleton's on-by-default typography styles, then apply new styles
as desired.