Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sarim/sonata-bootstrap-theme
script to generate the default twitter bootstrap theme used by the Sonata Project
https://github.com/sarim/sonata-bootstrap-theme
Last synced: 10 days ago
JSON representation
script to generate the default twitter bootstrap theme used by the Sonata Project
- Host: GitHub
- URL: https://github.com/sarim/sonata-bootstrap-theme
- Owner: sarim
- Created: 2013-12-12T16:00:46.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-12T18:19:06.000Z (almost 11 years ago)
- Last Synced: 2023-03-14T12:01:26.830Z (over 1 year ago)
- Language: CSS
- Homepage:
- Size: 513 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Sonata Bootstrap Theme
----------------------This project manages the Sonata Admin Theme by compiling a tweaked
version of the Twitter Bootstrap.The only difference with the original code is that css selectors
are prefixed by a specific key : 'sonata-bc' (Sonata Bootstrap Container).So a twitter bootstrap theme can be reuse in the a website without too much breaks.
Install
=======Install locally ``less`` and ``uglify-js``
# npm install less uglify-js
Changes
=======rulesets.js file :
// If this is the root node, we don't render
// a selector, or {}.
// Otherwise, only output if this ruleset has rules.
if (this.root) {
css.push(rules.join(env.compress ? '' : '\n'));
} else {
if (rules.length > 0) {
selector = paths.map(function (p) {
var name = p.map(function (s) {
return s.toCSS(env);
}).join('').trim();
if (name == '.sonata-bc') {
return name;
}return ".sonata-bc ".concat(name);
}).join(env.compress ? ',' : (paths.length > 3 ? ',\n' : ', '));
css.push(selector,
(env.compress ? '{' : ' {\n ') +
rules.join(env.compress ? '' : '\n ') +
(env.compress ? '}' : '\n}\n'));
}
}
css.push(rulesets);