Basic UI styling changed to SASS + initial theming support #4137
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,19 @@ | |
|
||
var | ||
gulp = require("gulp"), | ||
less = require("gulp-less"), | ||
sass = require("gulp-sass"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a new tool that we didn't use before, correct? If so, we will require a CQ and approval by Eclipse. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could also stick with LESS unless it doesn't support some of the required features. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd suggest to go with SASS because of the fact that MDL uses it natively by default. In the future we might extend/modify MDL stylesheets and possibly load them directly from See my comment from the first post:
I believe this approach will give us more flexibility overall and now is a good time to change it (since there's not much stylesheet to be maintained and conversion from LESS was pretty straightforward). What's a process of submitting CQs? Is that something a PR creator should do? Cheers! :-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @resetnow @kaikreuzer 馃彄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think eventually having MDL building from sources is a good point.
No, as far as I understand, some people from Eclipse org can do it, including @kaikreuzer There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, this has to be done by project committers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kaikreuzer that's right. |
||
uglify = require("gulp-uglify"), | ||
eslint = require("gulp-eslint"); | ||
|
||
var | ||
sources = { | ||
js: "web-src/smarthome.js", | ||
less: "web-src/smarthome.less" | ||
sass: "web-src/smarthome.scss" | ||
}; | ||
|
||
gulp.task("css", function() { | ||
return gulp.src(sources.less) | ||
.pipe(less({ compress: true })) | ||
return gulp.src(sources.sass) | ||
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError)) | ||
.pipe(gulp.dest("web")); | ||
}); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now a pretty different approach than we have in the Paper UI.
With the Paper UI, we allow ESH solutions to add a custom theme on top by adding a fragment. It is NOT a feature exposed to the user, though. I think this makes sense in terms of ensuring a "corporate identity", i.e. allowing solutions to make sure that their UIs carry their logo and match there general CI.
While I can understand that it can be useful to allow users to choose a light or dark theme, I am not so convinced, if we really need orange/blue/green color options (resp. rather allow solutions to add additional themes besides light/dark through a fragment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave just Default and Dark then. We can work on the fragment solution later on if that's preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. The leftover themes are still accessible from my public gist.