CSS Framework & Basic HTML
There are two ways to deal with standard typographic elements.
If you add the class of rich-text to any element, then all of it's children will get standard styling (font size, margin, etc.) for headings, paragraphs, etc. This is much easier, but the spacing will be less precise. This is useful for displaying user-generated basic html form a rich text editor.
Paragraph text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio. This one is longer.
Another paragraph: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.
For bold text, use the: strong or b tag.
For italicized text, us the em or i tag.
For small inline text, use the small tag.
For inline code, use the code tag.
Unordered List:
Unordered List:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor. Etiam non tortor eu nunc euismod aliquet vitae a odio.
Outside of rich-text, you can must add classes like h1, h2, h3, h4, p, small, strong, em. to any element to get the standard element styling. You can then add margin classes, put the elements into grids for arangement, and use the trim-text classes (see below) to really lock in spacing precisely. Here the class of demo-box adds a line around the text element to show the text trimming. Remove this.
Paragraph
Inline elements: small.small, span.small, strong.strong, span.strong, em.em, span.em
Blockquote: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor.
Another paragraph: Etiam non tortor eu nunc euismod aliquet vitae a odio.
If you want to add a small heading above a standard heading, add the class of small-heading to a div or any heading tag.
This example has a div.small-heading above a h1.h1. A margin class is added to adjust the spacing between them slightly. Trim-text is not used here.
This example has a h2.small-heading above a div.h2 showing how you can adjust the semantics without affecting the styling. A margin class is added to adjust the spacing between them slightly. Trim-text is not used here.
This example uses trim-text-elements and a grid to apply spacing between them. It includes a h1.small-heading followed by a h2.h2.
A blockquote should contain one or more p tags of text. It may be followed by a p.blockquote-attribution with info about who said the quote. Inside of rich-text the element is styled and indented. Outside of rich-text add the blockquote class to style it, but no indentation is added. Apply margin manually if you want to.
Blockquote: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam odio lectus, condimentum sit amet luctus sed, consequat et tortor.
Another paragraph: Etiam non tortor eu nunc euismod aliquet vitae a odio.
Guy Whosaidit
Distinguished Professor of Stuff
Name of His Book
Here is a blockquote with one paragraph and no attribution after it.
Either put lists inside of rich-text or add the ul or ol classes to get the standard list styling. You can use the --list-item-gap variable in a style attribute to adjust the space between items.
Basic unordered list with short items.
Basic unordered list with long items:
Fancy unordered list: if a list item contains a br tag, it will have block end margin.
Basic ordered list with short items.
Basic ordered list with long items:
Fancy ordered list: if a list item contains a br tag, it will have block end margin.
By default links and buttons look just like normal text so you can custom style them with a combination of other classes and style attributes in the HTML. They do, however, have the pointer cursor and a focus-visible outline by default.
The focus-outline's color is based on the color context of the link or button's ancestor. However, if you put a color-context- class on the link or button itself, the focus outline, which is outside the button will have its color set by the button's color context, not its ancestor. This is wrong. So it is best to wrap the button around an element with the color context class as shown below.
Add the text-link class to a link to get a standard underline styling, hover colors, etc. You can add color classes to set the link color and its hover color. The disabled class sets the color and disables link interaction. All a tags inside of rich-text get this styling with the vibrant color. When you want a text link with an icon, put the class of text-link-text on a span inside a link or button without the text-link class.
These tooltips are CSS-only (no JS required). They can be positioned on any of the 4 sides. You must use a button or a tag to trigger the tooltip. The span[role="tooltip"] must have an id attribute that matches the aria-labelledby attribute of the button or link.
align-ie
align-bs
align-be
align-is
Description...