- Each theme has its own directory in the
styles/themes
dir. - Each theme has two files,
variables.less/sass
andindex.less/sass
- Each theme may have its own components, utilities and other stylesheets
- All themes can use common, generic styles, structural classes, mixins and so on.
styles/
themes/
slides/
├── index.less
└── variables.less
components/
mixins/
docs/
├── index.less
└── variables.less
components/
mixins/
Here is how you might configure the
less
task in your Gruntfile, it's not much different forsass
less: {
options: {
paths: [
'<%= site.styles %>/mixins', // generic mixins
'<%= site.styles %>/<%= site.theme %>' // current theme directory
]
},
dest: {
src: ['<%= site.styles %>/<%= site.theme %>/index.less'],
dest: '<%= site.assets %>/css/<%= site.theme %>.css'
}
}
Use similar patterns for other tasks that use the theme.