From 97b317410345d56c274ad58f044d15cb06b8eca3 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 13 Jul 2019 20:53:44 -0400 Subject: xmls, css, codeblocks linenumbers --- org/output_xmls_css.org | 77 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 2 deletions(-) (limited to 'org/output_xmls_css.org') diff --git a/org/output_xmls_css.org b/org/output_xmls_css.org index 18eaa86..da374cf 100644 --- a/org/output_xmls_css.org +++ b/org/output_xmls_css.org @@ -324,7 +324,14 @@ template DocReformCss() { clear : both; color : #555555; } - p.code { + pre.codeline { + display : table; + clear : both; + table-layout : fixed; + margin-left : 5%%; + margin-right : 5%%; + width : 90%%; + white-space : pre-wrap; border-style : none; border-radius : 5px 5px 5px 5px; box-shadow : 0 2px 5px #AAAAAA inset; @@ -342,6 +349,36 @@ template DocReformCss() { font-size : 95%%; line-height : 100%%; } + pre.codeline::before { + counter-reset : linenum; + } + pre.codeline span.tr { + display : table-row; + counter-increment : linenum; + } + pre.codeline span.th { + display : table-cell; + user-select : none; + -moz-user-select : none; + -webkit-user-select : none; + padding : 0.5em 0.5em; + /* background-color : #666666; */ + } + pre.codeline span.th::before { + content : counter(linenum) "."; + color : #999999; + text-align : right; + display : block; + } + pre.codeline span.th { + width : 4em; + } + pre.codeline code { + display : table-cell; + } + p.code { + border-style : none; + } #+END_SRC ***** paragraph general @@ -1197,7 +1234,14 @@ Consider what if anything should be used here clear : both; color : #555555; } - p.code { + pre.codeline { + display : table; + clear : both; + table-layout : fixed; + margin-left : 5%%; + margin-right : 5%%; + width : 90%%; + white-space : pre-wrap; border-style : none; border-radius : 5px 5px 5px 5px; box-shadow : 0 2px 5px #AAAAAA inset; @@ -1215,6 +1259,35 @@ Consider what if anything should be used here font-size : 95%%; line-height : 100%%; } + pre.codeline::before { + counter-reset : linenum; + } + pre.codeline span.tr { + display : table-row; + counter-increment : linenum; + } + pre.codeline span.th { + display : table-cell; + user-select : none; + -moz-user-select : none; + -webkit-user-select : none; + padding : 0.5em 0.5em; + } + pre.codeline span.th::before { + content : counter(linenum) "."; + color : #999999; + text-align : right; + display : block; + } + pre.codeline span.th { + width : 4em; + } + pre.codeline code { + display : table-cell; + } + p.code { + border-style : none; + } #+END_SRC ***** paragraph general -- cgit v1.2.3