Commit eecda1b2 authored by Romain Courteaud's avatar Romain Courteaud

erp5_core: html viewer: improvements

* enable more elements/attributes
* show table cell's border
* reduce table width
* support align="center"
* only use sans-serif font like ckeditor
parent 95abef63
...@@ -28,42 +28,42 @@ div[data-gadget-url$="gadget_html_viewer.html"] pre { ...@@ -28,42 +28,42 @@ div[data-gadget-url$="gadget_html_viewer.html"] pre {
div[data-gadget-url$="gadget_html_viewer.html"] h1 { div[data-gadget-url$="gadget_html_viewer.html"] h1 {
display: block; display: block;
font-size: 2em; font-size: 2em;
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; font-family: 'Open Sans', Helvetica, Arial, sans-serif;
margin: 0.67em 0; margin: 0.67em 0;
font-weight: bold; font-weight: bold;
} }
div[data-gadget-url$="gadget_html_viewer.html"] h2 { div[data-gadget-url$="gadget_html_viewer.html"] h2 {
display: block; display: block;
font-size: 1.5em; font-size: 1.5em;
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; font-family: 'Open Sans', Helvetica, Arial, sans-serif;
margin: 0.83em 0; margin: 0.83em 0;
font-weight: bold; font-weight: bold;
} }
div[data-gadget-url$="gadget_html_viewer.html"] h3 { div[data-gadget-url$="gadget_html_viewer.html"] h3 {
display: block; display: block;
font-size: 1.17em; font-size: 1.17em;
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; font-family: 'Open Sans', Helvetica, Arial, sans-serif;
margin: 1em 0; margin: 1em 0;
font-weight: bold; font-weight: bold;
} }
div[data-gadget-url$="gadget_html_viewer.html"] h4 { div[data-gadget-url$="gadget_html_viewer.html"] h4 {
display: block; display: block;
font-size: 1em; font-size: 1em;
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; font-family: 'Open Sans', Helvetica, Arial, sans-serif;
margin: 1.33em 0; margin: 1.33em 0;
font-weight: bold; font-weight: bold;
} }
div[data-gadget-url$="gadget_html_viewer.html"] h5 { div[data-gadget-url$="gadget_html_viewer.html"] h5 {
display: block; display: block;
font-size: 0.83em; font-size: 0.83em;
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; font-family: 'Open Sans', Helvetica, Arial, sans-serif;
margin: 1.67em 0; margin: 1.67em 0;
font-weight: bold; font-weight: bold;
} }
div[data-gadget-url$="gadget_html_viewer.html"] h5 { div[data-gadget-url$="gadget_html_viewer.html"] h5 {
display: block; display: block;
font-size: 0.67em; font-size: 0.67em;
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; font-family: 'Open Sans', Helvetica, Arial, sans-serif;
margin: 2.33em 0; margin: 2.33em 0;
font-weight: bold; font-weight: bold;
} }
...@@ -126,7 +126,6 @@ div[data-gadget-url$="gadget_html_viewer.html"] table { ...@@ -126,7 +126,6 @@ div[data-gadget-url$="gadget_html_viewer.html"] table {
display: table; display: table;
border-spacing: 2px; border-spacing: 2px;
border: 1px solid #1F1F1F; border: 1px solid #1F1F1F;
width: 100%;
} }
div[data-gadget-url$="gadget_html_viewer.html"] thead { div[data-gadget-url$="gadget_html_viewer.html"] thead {
display: table-header-group; display: table-header-group;
...@@ -160,6 +159,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] th { ...@@ -160,6 +159,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] th {
display: table-cell; display: table-cell;
vertical-align: inherit; vertical-align: inherit;
padding: 0 6pt; padding: 0 6pt;
border: 1px solid #1F1F1F;
} }
div[data-gadget-url$="gadget_html_viewer.html"] th { div[data-gadget-url$="gadget_html_viewer.html"] th {
font-weight: bold; font-weight: bold;
...@@ -191,3 +191,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] dl dd, ...@@ -191,3 +191,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] dl dd,
div[data-gadget-url$="gadget_html_viewer.html"] dl dl { div[data-gadget-url$="gadget_html_viewer.html"] dl dl {
grid-column-start: 2; grid-column-start: 2;
} }
*[align="center"] {
margin-inline-start: auto;
margin-inline-end: auto;
}
...@@ -76,7 +76,9 @@ ...@@ -76,7 +76,9 @@
NAV: true, NAV: true,
FOOTER: true, FOOTER: true,
DIV: true, DIV: true,
SPAN: true SPAN: true,
DETAILS: true,
SUMMARY: true
}, },
attribute_list: { attribute_list: {
alt: true, alt: true,
...@@ -90,7 +92,11 @@ ...@@ -90,7 +92,11 @@
cellspacing: true, cellspacing: true,
cellpadding: true, cellpadding: true,
border: true, border: true,
colspan: true colspan: true,
rowspan: true,
align: true,
scope: true,
summary: true
}, },
style_list: { style_list: {
background: true, background: true,
...@@ -114,6 +120,7 @@ ...@@ -114,6 +120,7 @@
'padding-right': true, 'padding-right': true,
'padding-top': true, 'padding-top': true,
'padding-bottom': true, 'padding-bottom': true,
'text-align': true,
width: true width: true
}, },
link_node_list: { link_node_list: {
......
...@@ -45,7 +45,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] { ...@@ -45,7 +45,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] {
h1 { h1 {
display: block; display: block;
font-size: 2em; font-size: 2em;
font-family: @serif; font-family: @sans-serif;
margin: 0.67em 0; margin: 0.67em 0;
font-weight: bold font-weight: bold
} }
...@@ -53,7 +53,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] { ...@@ -53,7 +53,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] {
h2 { h2 {
display: block; display: block;
font-size: 1.5em; font-size: 1.5em;
font-family: @serif; font-family: @sans-serif;
margin: 0.83em 0; margin: 0.83em 0;
font-weight: bold font-weight: bold
} }
...@@ -61,7 +61,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] { ...@@ -61,7 +61,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] {
h3 { h3 {
display: block; display: block;
font-size: 1.17em; font-size: 1.17em;
font-family: @serif; font-family: @sans-serif;
margin: 1em 0; margin: 1em 0;
font-weight: bold font-weight: bold
} }
...@@ -69,7 +69,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] { ...@@ -69,7 +69,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] {
h4 { h4 {
display: block; display: block;
font-size: 1em; font-size: 1em;
font-family: @serif; font-family: @sans-serif;
margin: 1.33em 0; margin: 1.33em 0;
font-weight: bold font-weight: bold
} }
...@@ -77,7 +77,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] { ...@@ -77,7 +77,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] {
h5 { h5 {
display: block; display: block;
font-size: .83em; font-size: .83em;
font-family: @serif; font-family: @sans-serif;
margin: 1.67em 0; margin: 1.67em 0;
font-weight: bold font-weight: bold
} }
...@@ -85,7 +85,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] { ...@@ -85,7 +85,7 @@ div[data-gadget-url$="gadget_html_viewer.html"] {
h5 { h5 {
display: block; display: block;
font-size: .67em; font-size: .67em;
font-family: @serif; font-family: @sans-serif;
margin: 2.33em 0; margin: 2.33em 0;
font-weight: bold font-weight: bold
} }
...@@ -141,7 +141,6 @@ table { ...@@ -141,7 +141,6 @@ table {
display: table; display: table;
border-spacing: 2px; border-spacing: 2px;
border: 1px solid @colorforeground; border: 1px solid @colorforeground;
width: 100%;
} }
thead { thead {
display: table-header-group; display: table-header-group;
...@@ -176,6 +175,7 @@ td, th { ...@@ -176,6 +175,7 @@ td, th {
display: table-cell; display: table-cell;
vertical-align: inherit; vertical-align: inherit;
padding: 0 @margin-size; padding: 0 @margin-size;
border: 1px solid @colorforeground;
} }
th { th {
font-weight: bold; font-weight: bold;
...@@ -213,3 +213,8 @@ caption { ...@@ -213,3 +213,8 @@ caption {
} }
*[align="center"] {
margin-inline-start: auto;
margin-inline-end: auto;
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment