Global styles
Global styles provide you with good design defaults for a wide selection of HTML elements – all based on your design tokens.
Using global styles is as simple as writing semantic HTML. No class names. No components.
Below are tables of all the elements included in the SmoothCSS global styles. The descriptions explain the intention of the styles rather than the implementation details. This gives us the flexibility to change the implementation details as the browser, HTML and CSS evolve and improve.
There are some common HTML elements that are not covered by the global styles. This is generally for one of two reasons:
-
The styling depends on the context. For example, an
<aside>might be used for a callout or a sidebar. -
The visual styling is not specific to a single HTML element. Like how a
visual button could be a
<button>,<a>, or<input type="submit">.
In SmoothCSS these types of styles are covered by styling skins.
To make it easier to find the element your looking for, the elements are grouped into the following tables:
To see all of the global styles in context, please see this example page.
General elements
| Element | Styling |
|---|---|
| All HTML elements |
|
html |
|
body |
|
hr |
|
:target |
|
::selection |
|
[hidden] |
|
Typography
| Element | Styling |
|---|---|
h1 |
|
h2 |
|
h3 |
|
h4 |
|
h5 |
|
h6 |
|
p |
|
ins |
|
strong |
|
b |
|
q |
|
sub |
|
sup |
|
var |
|
math |
|
time |
|
code |
|
kbd |
|
samp |
|
pre |
|
abbr |
|
blockquote |
|
Lists
| Element | Styling |
|---|---|
ol |
|
ul |
|
dt |
|
dd |
|
Media
| Element | Styling |
|---|---|
img |
|
picture |
|
canvas |
|
video |
|
iframe |
|
figure |
|
figcaption |
|
svg |
|
Tables
| Element | Styling |
|---|---|
table |
|
tr |
|
th |
|
td |
|
caption |
|
Interactive elements
| Element | Styling |
|---|---|
a |
|
summary |
|
:focus |
|
:focus-visible |
|
Forms
| Element | Styling |
|---|---|
form |
|
button |
|
input |
|
input (not "checkbox", "radio" or "color") |
|
textarea |
|
select |
|
label |
|
label wrapping input |
|
fieldset |
|
legend |
|