fix pre block for ie6
All checks were successful
pyrite-dev/taiga/pipeline/head This commit looks good
All checks were successful
pyrite-dev/taiga/pipeline/head This commit looks good
This commit is contained in:
parent
48f26499e0
commit
25d07f8536
3 changed files with 35 additions and 0 deletions
|
|
@ -99,7 +99,30 @@ static int parse_file(const char* top, const char* full) {
|
|||
fprintf(f, " document.images[i].style.height = oldh + \"px\";\n");
|
||||
fprintf(f, " }\n");
|
||||
fprintf(f, " }\n");
|
||||
fprintf(f, " function fixTags(tagName){\n"); /* FIXME: remove some unneeded space that appears for no reasons */
|
||||
fprintf(f, " var tags = document.getElementById(\"content\").getElementsByTagName(tagName);\n");
|
||||
fprintf(f, " for(var i = 0; i < tags.length; i++){\n");
|
||||
fprintf(f, " var w = document.documentElement.clientWidth;\n");
|
||||
fprintf(f, " var e = document.getElementById(\"content\");\n");
|
||||
fprintf(f, " while(e){\n");
|
||||
fprintf(f, " w -= e.offsetLeft;\n");
|
||||
fprintf(f, " e = e.parentElement\n");
|
||||
fprintf(f, " }\n");
|
||||
fprintf(f, " tags[i].style.width = w + \"px\";\n");
|
||||
fprintf(f, " }\n");
|
||||
fprintf(f, " }\n");
|
||||
fprintf(f, " fixTags(\"pre\");\n");
|
||||
fprintf(f, " fixTags(\"table\");\n");
|
||||
fprintf(f, " fixTags(\"div\");\n");
|
||||
fprintf(f, " fixTags(\"p\");\n");
|
||||
fprintf(f, " document.documentElement.style.width = document.documentElement.clientWidth + \"px\";\n");
|
||||
fprintf(f, " </script>\n");
|
||||
fprintf(f, " </script>\n");
|
||||
fprintf(f, " <style>\n");
|
||||
fprintf(f, "pre {\n");
|
||||
fprintf(f, " width: 50px;\n");
|
||||
fprintf(f, "}\n");
|
||||
fprintf(f, " </style>\n");
|
||||
fprintf(f, " <![endif]-->\n");
|
||||
fprintf(f, " </body>\n");
|
||||
fprintf(f, "</html>\n");
|
||||
|
|
|
|||
|
|
@ -124,6 +124,12 @@ void classic_stylesheet(FILE* out, const char* top) {
|
|||
fprintf(out, " border-left: 1px solid #cccccc;\n");
|
||||
fprintf(out, "}\n");
|
||||
fprintf(out, "\n");
|
||||
fprintf(out, "pre {\n");
|
||||
fprintf(out, " overflow-wrap: break-word;\n");
|
||||
fprintf(out, " word-wrap: break-word;\n");
|
||||
fprintf(out, " white-space: pre-wrap;\n");
|
||||
fprintf(out, "}\n");
|
||||
fprintf(out, "\n");
|
||||
fprintf(out, ".message-icon {\n");
|
||||
fprintf(out, " padding-right: 5px;\n");
|
||||
fprintf(out, "}\n");
|
||||
|
|
|
|||
|
|
@ -171,6 +171,12 @@ void simple_stylesheet(FILE* out, const char* top) {
|
|||
fprintf(out, " border-bottom: solid 1px #808080;\n");
|
||||
fprintf(out, "}\n");
|
||||
fprintf(out, "\n");
|
||||
fprintf(out, "pre {\n");
|
||||
fprintf(out, " overflow-wrap: break-word;\n");
|
||||
fprintf(out, " word-wrap: break-word;\n");
|
||||
fprintf(out, " white-space: pre-wrap;\n");
|
||||
fprintf(out, "}\n");
|
||||
fprintf(out, "\n");
|
||||
fprintf(out, ".box-content ul {\n");
|
||||
fprintf(out, " margin: 0;\n");
|
||||
fprintf(out, " padding-top: 8px;\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue