This page lists the available Human CSS attributes and the meaning and values of each.
The text micro-attribute provides control over text color, fonts, alignment, and so on.
It is introduced by the micro-attribute text
.
text
takes values for color,
font size using standard synonyms such as large
(or any length),
font weight using standard synonyms such as bold
,
and others.
Other text attribute values include italic
, underline
, upper
, lower
, capitalize
, small-caps
, and so on.
Borders, margins, outlines, and padding are specified by the border
, margin
, outline
, and padding
micro-attributes.
The attribute values top
, left
, bottom
, and right
may be given to indicate which side or sides are to be affected.
A number or length, or keyword such as thick
or thin
, specifies the size of the border, margin, outline, or padding.
For borders and outlines, the standard types such as solid
and dotted
are available as micro-attributes.
Colors may also be specified for borders and padding.
The background
micro-atteribute provides a background of the specified color.
<div background="x-light blue color"></d
Box sizes are indicated with micro-attributes such as width
and height
,
which are given together with other micro-attributes indicating the size,
as a length, percentage, or keyword such as half
.
<div half width></div>
<div 40% height></div>
<div max-height 50 vh></div>
The box
micro-attribute specifies styling related to boxes,
including position (absolute
etc.),
display (hidden
),
vertical alignment,
visible
and invisible
,
box sizing ('borderor
content`), and so on.
People commonly use top margins and bottom margins and top padding and bottom padding and special spacing elements
to space out their elements.
Human CSS classes provide a simple mechanisms for controlling spacing.
The spaced
micro-attribute adds space between child elements.
Variants of these (indicated by modifier micro-attributes) provide more or less spacing.
Example of spaced children:
<div spaced>
<div></div>
<div></div>
</div>
<div opaque></div>
<div semi-opaque></div>
<div transparent></div>
<div opacity 0.8></div>
<div back></div>
<div front></div>
<div backmost></div>
<div frontmost></div>
<div absolute></div>
<div relative></div>
<div fixed></div>
THe transition
micro-attribute provides a streamlined interface for simple transitions.
<div transition="fast linear delay"></div>
Human CSS redefines the factors involved in white space control, making it easier to remember and specify your desired behavior. The CSS property values each indicate a combination of whether newlines are to be honored, whether whitespace is to be preserved, and whether wrapping is desired.
These human CSS micro-attribute values map those concepts into white-space
values,
so hopefully you'll never have to consult that page again.
Honor newlines.
Preserve spaces and tabs.
Do not wrap (other than at newlines, if they are being honored).
This is the classical white-space: pre
case.
It is appropriate for code fragments.
This corresponds to pre-line
, which is like pre
, but spaces and tabs will be collapsed.
This is suitable for the common case of displaying a user post.
Newlines are honored, spaces preserved, and wrapping occurs, meaning that output may extend to multiple lines,
this is equivalent to white-space: pre-wrap
.
This is equivalent to white-space: nowrap
.
Therefore, all output will be on a single line.
In this case, whitespace is never preserved.
Note that CSS offers no alternative for preserving whitespace while not honoring newlines and not wrapping.