lxml-css.mkiv /size: 2223 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=lxml-css,
3
%D version=2010.01.28,
4
%D title=\CONTEXT\ Modules,
5
%D subtitle=Css Helpers,
6
%D author=Hans Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is
11
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12
%C details.
13 14
\registerctxluafile
{
lxml
-
css
}{}
15 16
\unprotect
17 18
\def
\ctxmodulecss
#
1
{
\ctxlua{
moduledata
.
css
.
#
1
}
}
19 20
% No stable interface yet.
21 22
% \edef\CellPadding{\xmlatt{#1}{cellpadding}}
23
% \ifx\CellPadding\empty
24
% \edef\CellPadding{.25ex}
25
% \else
26
% \edef\CellPadding{\cssgetsinglepadding{\xmlatt{#1}{cellpadding}}}
27
% \fi
28
%
29
% \starttexdefinition cssgetsinglepadding #1
30
% \ctxlua {
31
% context((moduledata.css.padding(
32
% "#1",
33
% \number\dimexpr0.1ex,
34
% \number\dimexpr0.01\hsize,
35
% \number\dimexpr1ex,
36
% \number\dimexpr1em
37
% ))) % returns 4 values therefore ()
38
% }sp
39
% \stoptexdefinition
40 41
% \startxmlsetups html:settings
42
% \xmlsetsetup{#1}{p}{html:p}
43
% \stopxmlsetups
44
%
45
% \xmlmapvalue{ctx-before} {one} {\page BEFORE\par}
46
% \xmlmapvalue{ctx-after} {two} {\par AFTER\page}
47
% \xmlmapvalue{text-decoration}{underline}{U}
48
% \xmlmapvalue{text-decoration}{overline} {O}
49
%
50
% \startxmlsetups html:p
51
% \testfeatureonce{100000}{
52
% \edef\foo{\xmlcssstylevalue{#1}{ctx-before}\xmlcssstylevalue{#1}{ctx-after}}
53
% }
54
% \page {\tttf style="\xmlatt{#1}{style}"} : \elapsedtime\ s \page
55
% \xmlvalue{ctx-before}{\xmlcssstylevalue{#1}{ctx-before}}{}
56
% \xmlflush{#1}
57
% (\xmlcssstylevalue{#1}{text-decoration})
58
% (\xmlcssmappedstylevalue{#1}{text-decoration}{text-decoration})
59
% \xmlvalue{ctx-after} {\xmlcssstylevalue{#1}{ctx-after}}{}
60
% \stopxmlsetups
61
%
62
% \startbuffer[temp]
63
% <body>
64
% <p style='ctx-before: one; text-decoration: underline overline; ctx-after: two;'>foo 1</p>
65
% <p>foo 2</p>
66
% </body>
67
% \stopbuffer
68
%
69
% \xmlregistersetup{html:settings}
70
% \xmlprocessbuffer{main}{temp}{}
71 72
\let
\xmlcssstylevalue
\clf_xmlstylevalue
73
\let
\xmlcssmappedstylevalue
\clf_xmlmappedstylevalue
74 75
\protect
\endinput
76 77