Skip to content

Commit

Permalink
issue: rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Mar 21, 2018
1 parent 0e376ec commit 471273a
Show file tree
Hide file tree
Showing 15 changed files with 72 additions and 45 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"cssui",
"overlay"
],
"homepage": "https://github.com/afeiship/webkit-cssui-absolute-center",
"homepage": "https://github.com/afeiship/webkit-sassui-overlay",
"moduleType": [
"amd"
],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions gulp/test.js → build/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

//styles
gulp.task('test',function() {
return gulp.src('test/test.scss')
return gulp.src('docs/test.scss')
.pipe($.sass({outputStyle: 'expanded'}).on('error', $.sass.logError))
.pipe(gulp.dest('test'));
.pipe(gulp.dest('docs'));
});


Expand Down
30 changes: 18 additions & 12 deletions dist/webkit-sassui-overlay.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
/*webkit-sassui-overlay Start*/
@mixin webkit-sassui-overlay($inPostion:fixed,$inOpacity:0.4,$inIndex:100,$inColor:#000){
$webkit-sassui-overlay-position:(fixed, absolute);

.webkit-sassui-overlay{
//Your mixin code goes here.
position: $inPostion;
background: rgba($inColor,$inOpacity);

@each $value in $webkit-sassui-overlay-position{
&[data-position=#{$value}]{
position: $value;
}
}

&[data-color=black]{
background: rgba(#000,0.4);
}

&[data-color=white]{
background: rgba(#FFF,0.4);
}

left:0;
right:0;
bottom:0;
top:0;
z-index: $inIndex;
}

@mixin webkit-sassui-overlay-black($inPostion:fixed,$inOpacity:0.4,$inIndex:100){
@include webkit-sassui-overlay($inPostion,$inOpacity,$inIndex,#000);
}

@mixin webkit-sassui-overlay-white($inPostion:fixed,$inOpacity:0.4,$inIndex:100){
@include webkit-sassui-overlay($inPostion,$inOpacity,$inIndex,#FFF);
}
/*webkit-sassui-overlay End*/
2 changes: 1 addition & 1 deletion test/test.html → docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<link rel="stylesheet" href="./test.css">
</head>
<body>
<div class="test-webkit-sassui-overlay"></div>
<div class="webkit-sassui-overlay" data-color=black data-position=fixed></div>
</body>
</html>
25 changes: 25 additions & 0 deletions docs/test.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*webkit-sassui-overlay Start*/
.webkit-sassui-overlay {
left: 0;
right: 0;
bottom: 0;
top: 0;
}

.webkit-sassui-overlay[data-position=fixed] {
position: fixed;
}

.webkit-sassui-overlay[data-position=absolute] {
position: absolute;
}

.webkit-sassui-overlay[data-color=black] {
background: rgba(0, 0, 0, 0.4);
}

.webkit-sassui-overlay[data-color=white] {
background: rgba(255, 255, 255, 0.4);
}

/*webkit-sassui-overlay End*/
1 change: 1 addition & 0 deletions docs/test.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "../dist/webkit-sassui-overlay.scss";
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
});

//import
fs.readdirSync('./gulp').map(function(file) {
require('./gulp/' + file);
fs.readdirSync('./build').map(function(file) {
require('./build/' + file);
});


Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"name": "afei",
"email": "1290657123@qq.com"
},
"scripts":{
"build":"gulp"
},
"main":"dist/webkit-sassui-overlay.scss",
"license": "MIT",
"devDependencies": {
"del": "^2.2.1",
Expand Down
30 changes: 18 additions & 12 deletions src/webkit-sassui-overlay.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
/*webkit-sassui-overlay Start*/
@mixin webkit-sassui-overlay($inPostion:fixed,$inOpacity:0.4,$inIndex:100,$inColor:#000){
$webkit-sassui-overlay-position:(fixed, absolute);

.webkit-sassui-overlay{
//Your mixin code goes here.
position: $inPostion;
background: rgba($inColor,$inOpacity);

@each $value in $webkit-sassui-overlay-position{
&[data-position=#{$value}]{
position: $value;
}
}

&[data-color=black]{
background: rgba(#000,0.4);
}

&[data-color=white]{
background: rgba(#FFF,0.4);
}

left:0;
right:0;
bottom:0;
top:0;
z-index: $inIndex;
}

@mixin webkit-sassui-overlay-black($inPostion:fixed,$inOpacity:0.4,$inIndex:100){
@include webkit-sassui-overlay($inPostion,$inOpacity,$inIndex,#000);
}

@mixin webkit-sassui-overlay-white($inPostion:fixed,$inOpacity:0.4,$inIndex:100){
@include webkit-sassui-overlay($inPostion,$inOpacity,$inIndex,#FFF);
}
/*webkit-sassui-overlay End*/
11 changes: 0 additions & 11 deletions test/test.css

This file was deleted.

4 changes: 0 additions & 4 deletions test/test.scss

This file was deleted.

0 comments on commit 471273a

Please sign in to comment.