aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/cha-css.733
-rw-r--r--doc/css.md26
2 files changed, 43 insertions, 16 deletions
diff --git a/doc/cha-css.7 b/doc/cha-css.7
index b141e39a..cfb41044 100644
--- a/doc/cha-css.7
+++ b/doc/cha-css.7
@@ -2,8 +2,8 @@
.\"
.TH "cha\-css" "7" "" "" "Image support in Chawan"
.SH CSS in Chawan
-This document describes CSS properties supported by Chawan, as well as
-its proprietary extensions and deviations from standards.
+This document describes CSS features supported by Chawan, as well as its
+proprietary extensions and deviations from standards.
.PP
If you discover a deviation that is not covered by this document, please
open a ticket at \c
@@ -153,6 +153,21 @@ non\-shorthand properties and the \f[CR]background\f[R] shorthand.
Values with a \f[CR]<length>\f[R] type support very simple
\f[CR]calc()\f[R] expressions that consist of one addition or
subtraction and do not use the \f[CR]var\f[R] function.
+.SS Selectors
+All selector types from CSS 2.1 are supported, except for namespaces.
+.PP
+Following standard pseudo\-classes are supported:
+\f[CR]:first\-child\f[R], \f[CR]:last\-child\f[R],
+\f[CR]:only\-child\f[R], \f[CR]:hover\f[R], \f[CR]:root\f[R],
+\f[CR]:nth\-child()\f[R], \f[CR]:nth\-last\-child()\f[R],
+\f[CR]:checked\f[R], \f[CR]:focus\f[R], \f[CR]:is()\f[R],
+\f[CR]:not()\f[R], \f[CR]:where()\f[R], \f[CR]:lang()\f[R] (only
+\[lq]en\[rq] is matched), \f[CR]:link\f[R], \f[CR]:target\f[R].
+.PP
+\f[CR]:visited\f[R] is parsed, but for now it is not matched.
+.PP
+The standard pseudo\-elements \f[CR]::before\f[R], \f[CR]::after\f[R],
+and \f[CR]::marker\f[R] are supported.
.SS Proprietary extensions
.IP \[bu] 2
\f[CR]text\-align\f[R] accepts the values \f[CR]\-cha\-center\f[R],
@@ -192,12 +207,12 @@ The \f[CR]\-cha\-colspan\f[R] and \f[CR]\-cha\-rowspan\f[R] properties
have the same effect as the \f[CR]colspan\f[R] and \f[CR]rowspan\f[R]
attributes on tables.
.IP \[bu] 2
-The \f[CR]\-cha\-first\-node\f[R] and \f[CR]\-cha\-last\-node\f[R]
-selectors apply to elements that have no preceding/subsequent sibling
-node that is either an element node or a text node with non\-whitespace
-contents.
-(Modeled after \f[CR]\-moz\-first\-node\f[R] and
-\f[CR]\-moz\-last\-node\f[R].)
+The \f[CR]:\-cha\-first\-node\f[R] and \f[CR]:\-cha\-last\-node\f[R]
+pseudo\-classes apply to elements that have no preceding/subsequent
+sibling node that is either an element node or a text node with
+non\-whitespace contents.
+(Modeled after \f[CR]:\-moz\-first\-node\f[R] and
+\f[CR]:\-moz\-last\-node\f[R].)
.IP \[bu] 2
If \f[CR]buffer.mark\-links\f[R] is set, the
\f[CR]::\-cha\-link\-marker\f[R] pseudo\-element will be generated on
@@ -210,7 +225,7 @@ screen.
The user agent style sheet is a combination of the styles suggested by
the HTML standard and a CSS port of w3m\[cq]s rendering.
In general, faithfulness to w3m is preferred over the standard\[cq]s
-suggestions, unless those break on existing websites.
+suggestions, unless w3m\[cq]s rendering breaks on existing websites.
.PP
Link colors differ depending on the terminal\[cq]s color scheme.
.SS Sizing and positioning
diff --git a/doc/css.md b/doc/css.md
index c40fd2be..8b6b430e 100644
--- a/doc/css.md
+++ b/doc/css.md
@@ -4,7 +4,7 @@ MANOFF -->
# CSS in Chawan
-This document describes CSS properties supported by Chawan, as well as
+This document describes CSS features supported by Chawan, as well as
its proprietary extensions and deviations from standards.
If you discover a deviation that is not covered by this document, please
@@ -91,7 +91,18 @@ Values with a `<length>` type support very simple `calc()` expressions
that consist of one addition or subtraction and do not use the `var`
function.
-The standard pseudo-elements ::before, ::after, and ::marker are
+## Selectors
+
+All selector types from CSS 2.1 are supported, except for namespaces.
+
+Following standard pseudo-classes are supported: `:first-child`,
+`:last-child`, `:only-child`, `:hover`, `:root`, `:nth-child()`,
+`:nth-last-child()`, `:checked`, `:focus`, `:is()`, `:not()`,
+`:where()`, `:lang()` (only "en" is matched), `:link`, `:target`.
+
+`:visited` is parsed, but for now it is not matched.
+
+The standard pseudo-elements `::before`, `::after`, and `::marker` are
supported.
## Proprietary extensions
@@ -105,6 +116,7 @@ supported.
- An 8-bit integer, indicating a color value as set by XTerm's
indexed color feature.
+
- One of the strings "black", "red", "green", "yellow", "blue",
"magenta", "cyan", "white" for an ANSI color, possibly
prefixed by the string "bright-" to indicate an aixterm
@@ -126,10 +138,10 @@ supported.
* The `-cha-colspan` and `-cha-rowspan` properties have the same effect
as the `colspan` and `rowspan` attributes on tables.
-* The `-cha-first-node` and `-cha-last-node` selectors apply to elements
- that have no preceding/subsequent sibling node that is either an
- element node or a text node with non-whitespace contents. (Modeled
- after `-moz-first-node` and `-moz-last-node`.)
+* The `:-cha-first-node` and `:-cha-last-node` pseudo-classes apply to
+ elements that have no preceding/subsequent sibling node that is either
+ an element node or a text node with non-whitespace contents. (Modeled
+ after `:-moz-first-node` and `:-moz-last-node`.)
* If `buffer.mark-links` is set, the `::-cha-link-marker` pseudo-element
will be generated on all anchor elements.
@@ -144,7 +156,7 @@ the display model inherent to projecting the web to a cell-based screen.
The user agent style sheet is a combination of the styles suggested by
the HTML standard and a CSS port of w3m's rendering. In general,
faithfulness to w3m is preferred over the standard's suggestions, unless
-those break on existing websites.
+w3m's rendering breaks on existing websites.
Link colors differ depending on the terminal's color scheme.