Standard CSS Keywords
A • B • C • D • E • F • G • H • I • J • K • L • M • N • O • P • Q • R • S • T • U • V • W • X • Y • ZA
B
C
D
Keyword | PD4ML Support | Comments |
---|---|---|
:default |
||
deg |
||
:dir |
||
direction |
||
:disabled |
||
display |
||
dpcm |
||
dpi |
||
dppx |
||
drop-shadow() |
E
Keyword | PD4ML Support | Comments |
---|---|---|
element() |
||
ellipse() |
||
em |
||
:empty |
||
empty-cells |
||
:enabled |
||
ex |
F
G
H
Keyword | PD4ML Support | Comments |
---|---|---|
Hz |
||
hanging-punctuation |
||
height |
||
height (@viewport) |
||
@historical-forms |
||
:hover |
||
hsl() |
||
hsla() |
||
hue-rotate() |
||
hyphens |
I
J
Keyword | PD4ML Support | Comments |
---|---|---|
justify-content |
||
justify-items |
||
justify-self |
K
Keyword | PD4ML Support | Comments |
---|---|---|
kHz |
||
@keyframes |
L
Keyword | PD4ML Support | Comments |
---|---|---|
:lang |
||
:last-child |
||
:last-of-type |
||
leader() |
||
:left |
||
left |
||
@left-bottom |
||
<length> |
||
letter-spacing |
||
line-break |
||
line-height |
||
linear-gradient() |
||
:link |
||
list-style |
||
list-style-image |
||
list-style-position |
||
list-style-type |
||
local() |
M
N
Keyword | PD4ML Support | Comments |
---|---|---|
@namespace |
||
negative (@counter-style) |
||
:not |
||
:nth-child |
||
:nth-last-child |
||
:nth-last-of-type |
||
:nth-of-type |
||
<number> |
O
P
Q
Keyword | PD4ML Support | Comments |
---|---|---|
Q |
||
quotes |
R
S
T
U
Keyword | PD4ML Support | Comments |
---|---|---|
unicode-bidi |
||
unicode-range (@font-face) |
||
unset |
||
<url> |
||
url() |
||
user-zoom (@viewport) |
V
Keyword | PD4ML Support | Comments |
---|---|---|
:valid |
||
var() |
||
vertical-align |
||
vh |
||
@viewport |
||
visibility |
||
:visited |
||
vmax |
||
vmin |
||
vw |
W
Keyword | PD4ML Support | Comments |
---|---|---|
white-space |
||
widows |
||
width |
||
width (@viewport) |
||
will-change |
||
word-break |
||
word-spacing |
||
word-wrap |
||
writing-mode |
X
Keyword | PD4ML Support | Comments |
---|---|---|
x |
Z
Keyword | PD4ML Support | Comments |
---|---|---|
z-index |
||
zoom (@viewport) |
Supported CSS selectors
* | Universal selector | Matches any element |
E | Type selectors | Matches any E element (i.e., an element of type E) |
E.foo | Class selector | Matches E element of class "foo" |
.foo (or *.foo) | Class selector | Matches any element of class "foo" |
E.foo.bar | Multi-class selector | Matches E element of both classes "foo" and "bar" |
.foo.bar (or *.foo.bar) | Multi-class selector | Matches any element of both classes "foo" and "bar" |
E F | Descendant selectors | Matches any F element that is a child of an element E |
E > F | Child selectors | Matches any F element that is a child of an element E |
E:first-child | The :first-child pseudo-class | Matches element E when E is the first child of its parent |
E:nth-child(even|odd) | Structural pseudo-class selector | Matches E element, the even or odd child of its parent |
E + F | Adjacent selectors | Matches any F element immediately preceded by a sibling element E |
E[foo] | Attribute selectors | Matches any E element with the "foo" attribute set (whatever the value) |
E[foo="warning"] | Attribute selectors | Matches any E element whose "foo" attribute value is exactly equal to "warning" |
PD4ML Proprietary Media Type pdf
By default PD4ML applies CSS properties, defined for media type screen
(if a media type specified). Of course, it also applies styles of media type
all[css], but [css]printis ignored. If for some reason print styles must be applied, PD4ML allows to enable them with the API call:
Map m = new HashMap(); m.put(PD4Constants.PD4ML_MEDIA_TYPE_PRINT, "add"); pd4ml.setDynamicParams(m);The above code enables
print
media type in addition to screen
. If screen
styles are undesired, the following disables screen
and enables print
.
Map m = new HashMap(); m.put(PD4Constants.PD4ML_MEDIA_TYPE_PRINT, "override"); pd4ml.setDynamicParams(m);
In situations, when very special styles are required for pdf conversions only, there is a proprietary media type pdf
.
As the type is known to PD4ML only, it will be ignored by the
regular web browsers.
@media pdf { TR, IMG {page-break-inside: avoid;} }
CSS media queries are not supported.
PD4ML Proprietary CSS Properties
pd4ml-visibility
and pd4ml-display
With PD4ML-specific CSS properties pd4ml-visibility
and pd4ml-display
there is a possibility to exclude particular elements from a resulting PDF document. The properties syntax is more-less identical to the standard visibility
and display
.
<input style="pd4ml-display: none; pd4ml-visibility: hidden" type=submit value="Get the page as PDF">
An opposite effect can be achieved with the code below. As you see, the proprietary properties take precedence over the standard visibility
and display
in PD4ML environment. But by the regular web browser they are not known and just ignored.
<div style="display: none; visibility: hidden; pd4ml-display: block; pd4ml-visibility: visible"> The section is visible only in PDF report </div>
pd4toc
CSS property to be applied to <H1>-<H6>
heading tags to suppress page numbering in the table of contents (if defined with <pd4ml:toc>
). It can be applied to all headings of a particular level:
H3 {pd4toc: nopagenum}or to selected tags individually.
pd4ml-bookmark-visibility
Makes possible to exclude some items from PDF bookmarks structure.
H3 { pd4ml-bookmark-visibility: hidden }or
<h3 style="pd4ml-bookmark-visibility: hidden">
for a single bookmark exclusion.
pd4ml-new-page-table-header-copy
By default, if a table has <thead> section (or leading <tr> with <th> cells only, which defines <thead> implicitly), the section is considered as a table header and replicated on a new page after each table page break. The behavior is not always desired and can be disabled with the CSS property:
TABLE { pd4ml-new-page-table-header-copy: never }