Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Removed accidental dual-emit of skin-level CSS. Copy/paste bug. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | style-css-revamp |
| Files: | files | file ages | folders |
| SHA3-256: |
eddb5ac5528bf099bedd933d20d7ec51 |
| User & Date: | stephan 2020-05-17 19:55:30.331 |
Context
|
2020-05-18
| ||
| 02:59 | style.css now checks for a builtin file named after the first path component of the referer (sic), rather than PD("name"), however, we still have to emit style.css/PAGENAME in $stylesheet_url in order to pick up the the page-specific CSS, otherwise /style.css?id=... is the same for all pages and a page with its own style may pick up a cached copy without its own styles, or with the styles from another page. ... (check-in: 5abc0f6e79 user: stephan tags: style-css-revamp) | |
|
2020-05-17
| ||
| 19:55 | Removed accidental dual-emit of skin-level CSS. Copy/paste bug. ... (check-in: eddb5ac552 user: stephan tags: style-css-revamp) | |
| 19:49 | Eliminated an unnecessary allocation. Code style conformance tweaks. ... (check-in: e2a9fe4bc8 user: stephan tags: style-css-revamp) | |
Changes
Changes to src/style.c.
| ︙ | ︙ | |||
1081 1082 1083 1084 1085 1086 1087 |
*/
void page_style_css(void){
Blob css = empty_blob;
int i;
const char *zPage = P("name");
cgi_set_content_type("text/css");
| | < | 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 |
*/
void page_style_css(void){
Blob css = empty_blob;
int i;
const char *zPage = P("name");
cgi_set_content_type("text/css");
/* Emit all default rules... */
for(i=1; cssDefaultList[i].elementClass; i++){
char *z = blob_str(&css);
if( !containsSelector(z, cssDefaultList[i].elementClass) ){
blob_appendf(&css, "%s {\n%s}\n",
cssDefaultList[i].elementClass,
cssDefaultList[i].value);
}
}
blob_append(&css,
"\n/***********************************************************\n"
"** All CSS above is generated automatically by Fossil to\n"
"** provide default rule implementations which the \"skin\"\n"
"** may cascade.\n"
"***********************************************************/\n",
-1);
if(zPage!=0 && zPage[0]!=0){
char * zFile = mprintf("style.%s.css", zPage);
int nFile = 0;
const char *zBuiltin = (const char *)builtin_file(zFile, &nFile);
if(nFile>0){
blob_appendf(&css,
"\n/***********************************************************\n"
|
| ︙ | ︙ |