diff --git a/src/core/fresh-theme.js b/src/core/fresh-theme.js
index 86944f2..08fcc9b 100644
--- a/src/core/fresh-theme.js
+++ b/src/core/fresh-theme.js
@@ -181,15 +181,26 @@ Definition of the FRESHTheme class.
return fmt && (fmt.ext === 'css');
}))
- // For each CSS file, get its corresponding HTML file
+ // For each CSS file, get its corresponding HTML file. It's possible that
+ // a theme can have a CSS file but *no* HTML file, as when a theme author
+ // creates a pure CSS override of an existing theme.
.forEach(function( cssf ) {
var idx = _.findIndex(fmts, function( fmt ) {
return fmt && fmt.pre === cssf.pre && fmt.ext === 'html';
});
cssf.action = null;
- fmts[ idx ].css = cssf.data;
- fmts[ idx ].cssPath = cssf.path;
+ if( idx > -1) {
+ fmts[ idx ].css = cssf.data;
+ fmts[ idx ].cssPath = cssf.path;
+ }
+ else {
+ if( that.inherits ) {
+ // Found a CSS file without an HTML file in a theme that inherits
+ // from another theme. This is the override CSS file.
+ that.overrides = { file: cssf.path, data: cssf.data };
+ }
+ }
});
// Remove CSS files from the formats array
diff --git a/src/eng/generic-helpers.js b/src/eng/generic-helpers.js
index a9defba..a5b1751 100644
--- a/src/eng/generic-helpers.js
+++ b/src/eng/generic-helpers.js
@@ -215,9 +215,17 @@ Generic template helper definitions for HackMyResume / FluentCV.
via tag.
*/
styleSheet: function( file, options ) {
- return ( this.opts.css === 'link') ?
+ var styles = ( this.opts.css === 'link') ?
'' :
'';
+ if( this.opts.themeObj.inherits &&
+ this.opts.themeObj.inherits.html &&
+ this.format === 'html' ) {
+ styles += (this.opts.css === 'link') ?
+ '' :
+ '';
+ }
+ return styles;
},
/**
diff --git a/src/eng/handlebars-generator.js b/src/eng/handlebars-generator.js
index b9895eb..16c7e30 100644
--- a/src/eng/handlebars-generator.js
+++ b/src/eng/handlebars-generator.js
@@ -45,6 +45,7 @@ Definition of the HandlebarsGenerator class.
RAW: json,
filt: opts.filters,
cssInfo: cssInfo,
+ format: format,
opts: opts,
headFragment: opts.headFragment || ''
});