Permalink
Browse files

Convert less to use bootstrap variables and mixins

  • Loading branch information...
Julusian committed Nov 20, 2015
1 parent 8bda1c3 commit 2473fcf36ece7ceeca6dafe257e9b40b29d5d7a1
View
@@ -1,3 +1,4 @@
nbproject
node_modules
bower_components
/vendor/
@@ -24,17 +24,13 @@
.bootstrap-dialog .bootstrap-dialog-close-button {
font-size: 20px;
float: right;
filter: alpha(opacity=90);
-moz-opacity: 0.9;
-khtml-opacity: 0.9;
opacity: 0.9;
filter: alpha(opacity=90);
}
.bootstrap-dialog .bootstrap-dialog-close-button:hover {
cursor: pointer;
filter: alpha(opacity=100);
-moz-opacity: 1;
-khtml-opacity: 1;
opacity: 1;
filter: alpha(opacity=100);
}
.bootstrap-dialog.type-default .modal-header {
background-color: #fff;
@@ -46,7 +42,7 @@
background-color: #5bc0de;
}
.bootstrap-dialog.type-primary .modal-header {
background-color: #428bca;
background-color: #337ab7;
}
.bootstrap-dialog.type-success .modal-header {
background-color: #5cb85c;

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
View
@@ -10,15 +10,19 @@ var gulp = require("gulp"),
notify = require("gulp-notify"),
clean = require("gulp-clean"),
rename = require("gulp-rename"),
concat = require("gulp-concat"),
uglify = require("gulp-uglify");
var less_src = [
"node_modules/bootstrap/less/variables.less",
"node_modules/bootstrap/less/mixins/*.less",
"src/less/bootstrap-dialog.less"
];
gulp.task("less", function() {
gulp.src("src/less/bootstrap-dialog.less")
.pipe(gulp.dest("dist/less"))
.pipe(less({
paths: [path.join(__dirname, "less", "includes")]
}))
gulp.src(less_src)
.pipe(concat("bootstrap-dialog.less"))
.pipe(less())
.pipe(gulp.dest("dist/css"))
.pipe(gulp.dest("src/css"))
.pipe(rename("bootstrap-dialog.min.css"))
View
@@ -24,9 +24,11 @@
},
"homepage": "http://nakupanda.github.io/bootstrap3-dialog",
"devDependencies": {
"bootstrap": ">=3.1.0",
"eslint": ">=0.6.2",
"gulp": ">=3.8.1",
"gulp-clean": ">=0.3.0",
"gulp-concat": "^2.5.2",
"gulp-eslint": ">=0.1.7",
"gulp-less": ">=1.2.3",
"gulp-minify-css": "^0.3.4",
@@ -24,17 +24,13 @@
.bootstrap-dialog .bootstrap-dialog-close-button {
font-size: 20px;
float: right;
filter: alpha(opacity=90);
-moz-opacity: 0.9;
-khtml-opacity: 0.9;
opacity: 0.9;
filter: alpha(opacity=90);
}
.bootstrap-dialog .bootstrap-dialog-close-button:hover {
cursor: pointer;
filter: alpha(opacity=100);
-moz-opacity: 1;
-khtml-opacity: 1;
opacity: 1;
filter: alpha(opacity=100);
}
.bootstrap-dialog.type-default .modal-header {
background-color: #fff;
@@ -46,7 +42,7 @@
background-color: #5bc0de;
}
.bootstrap-dialog.type-primary .modal-header {
background-color: #428bca;
background-color: #337ab7;
}
.bootstrap-dialog.type-success .modal-header {
background-color: #5cb85c;
@@ -18,23 +18,17 @@
.bootstrap-dialog-close-button {
font-size: 20px;
float: right;
filter:alpha(opacity=90);
-moz-opacity:0.9;
-khtml-opacity: 0.9;
opacity: 0.9;
.opacity(0.9);
&:hover {
cursor: pointer;
filter: alpha(opacity=100);
-moz-opacity: 1;
-khtml-opacity: 1;
opacity: 1;
.opacity(1.0);
}
}
/* dialog types */
&.type-default {
.modal-header {
background-color: #fff;
background-color: @modal-content-bg;
}
.bootstrap-dialog-title {
color: #333;
@@ -43,31 +37,31 @@
&.type-info {
.modal-header {
background-color: #5bc0de;
background-color: @brand-info;
}
}
&.type-primary {
.modal-header {
background-color: #428bca;
background-color: @brand-primary;
}
}
&.type-success {
.modal-header {
background-color: #5cb85c;
background-color: @brand-success;
}
}
&.type-warning {
.modal-header {
background-color: #f0ad4e;
background-color: @brand-warning;
}
}
&.type-danger {
.modal-header {
background-color: #d9534f;
background-color: @brand-danger;
}
}

0 comments on commit 2473fcf

Please sign in to comment.