Fossil SCM

Improved formatting of the generated CSS.

drh 2017-12-03 17:09 trunk
Commit 52b003f1f955f22325ef39af974e966c656ea259fc25a9885b23d223f3042245
2 files changed +1 -1 +7 -2
+1 -1
--- src/mkcss.c
+++ src/mkcss.c
@@ -125,11 +125,11 @@
125125
fprintf(stderr, "%s:%d: CSS rule not within a selector\n",
126126
zInFile, nLine);
127127
exit(1);
128128
}
129129
for(i=0; isspace(z[i]); i++){}
130
- fprintf(out, " \"");
130
+ fprintf(out, " \" ");
131131
clang_puts(out, z+i);
132132
fprintf(out, "\\n\"\n");
133133
}else if( z[0]=='}' ){
134134
if( !inRules ){
135135
fprintf(stderr, "%s:%d: surplus CSS rule terminator\n",
136136
--- src/mkcss.c
+++ src/mkcss.c
@@ -125,11 +125,11 @@
125 fprintf(stderr, "%s:%d: CSS rule not within a selector\n",
126 zInFile, nLine);
127 exit(1);
128 }
129 for(i=0; isspace(z[i]); i++){}
130 fprintf(out, " \"");
131 clang_puts(out, z+i);
132 fprintf(out, "\\n\"\n");
133 }else if( z[0]=='}' ){
134 if( !inRules ){
135 fprintf(stderr, "%s:%d: surplus CSS rule terminator\n",
136
--- src/mkcss.c
+++ src/mkcss.c
@@ -125,11 +125,11 @@
125 fprintf(stderr, "%s:%d: CSS rule not within a selector\n",
126 zInFile, nLine);
127 exit(1);
128 }
129 for(i=0; isspace(z[i]); i++){}
130 fprintf(out, " \" ");
131 clang_puts(out, z+i);
132 fprintf(out, "\\n\"\n");
133 }else if( z[0]=='}' ){
134 if( !inRules ){
135 fprintf(stderr, "%s:%d: surplus CSS rule terminator\n",
136
+7 -2
--- src/style.c
+++ src/style.c
@@ -831,12 +831,17 @@
831831
char *z = blob_str(&css);
832832
if( !containsSelector(z, cssDefaultList[i].elementClass) ){
833833
if( !isInit ){
834834
isInit = 1;
835835
blob_append(&css,
836
- "/*** All the follows is supplemental CSS automatically generated"
837
- " by Fossil ***/\n", -1);
836
+ "\n/***********************************************************\n"
837
+ "** All CSS above is supplied by the repository \"skin\".\n"
838
+ "** That which follows is generated automatically by Fossil\n"
839
+ "** to fill in needed selectors that are missing from the\n"
840
+ "** \"skin\" CSS.\n"
841
+ "***********************************************************/\n",
842
+ -1);
838843
}
839844
blob_appendf(&css, "%s {\n%s}\n",
840845
cssDefaultList[i].elementClass,
841846
cssDefaultList[i].value);
842847
}
843848
--- src/style.c
+++ src/style.c
@@ -831,12 +831,17 @@
831 char *z = blob_str(&css);
832 if( !containsSelector(z, cssDefaultList[i].elementClass) ){
833 if( !isInit ){
834 isInit = 1;
835 blob_append(&css,
836 "/*** All the follows is supplemental CSS automatically generated"
837 " by Fossil ***/\n", -1);
 
 
 
 
 
838 }
839 blob_appendf(&css, "%s {\n%s}\n",
840 cssDefaultList[i].elementClass,
841 cssDefaultList[i].value);
842 }
843
--- src/style.c
+++ src/style.c
@@ -831,12 +831,17 @@
831 char *z = blob_str(&css);
832 if( !containsSelector(z, cssDefaultList[i].elementClass) ){
833 if( !isInit ){
834 isInit = 1;
835 blob_append(&css,
836 "\n/***********************************************************\n"
837 "** All CSS above is supplied by the repository \"skin\".\n"
838 "** That which follows is generated automatically by Fossil\n"
839 "** to fill in needed selectors that are missing from the\n"
840 "** \"skin\" CSS.\n"
841 "***********************************************************/\n",
842 -1);
843 }
844 blob_appendf(&css, "%s {\n%s}\n",
845 cssDefaultList[i].elementClass,
846 cssDefaultList[i].value);
847 }
848

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button