Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Feb 27, 2021
1 parent a6e33a4 commit f91c409
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 6 deletions.
31 changes: 28 additions & 3 deletions dist/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,41 @@
* description: Rotatable element.
* homepage: https://github.com/afeiship/wsui-rotatable
* version: 1.0.0
* date: 2020-12-23 15:01:37
* date: 2021-02-27 10:17:23
* license: MIT
*/

/*wsui-rotatable Start*/
$wsui-rotatable-options: (
color: #f00
duration: 0.3s,
items: (
45,
90,
180,
270,
360
)
) !default;

.wsui-rotatable {
//Your code goes here.
/* prettier-ignore */
$items: map-get($map: $wsui-rotatable-options, $key: items );
$duration: map-get( $map: $wsui-rotatable-options, $key: duration );
/* prettier-ignore-end */

.is-rotatable {
transform: rotate(0);
transition: all $duration;
}

@each $item in $items {
&.is-#{$item} {
&:hover {
.is-rotatable {
transform: rotate(#{$item}deg);
}
}
}
}
}
/*wsui-rotatable End*/
19 changes: 18 additions & 1 deletion dist/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,25 @@
* description: Rotatable element.
* homepage: https://github.com/afeiship/wsui-rotatable
* version: 1.0.0
* date: 2020-12-23 15:01:37
* date: 2021-02-27 10:17:23
* license: MIT
*/
/*wsui-rotatable Start*/
.wsui-rotatable {
/* prettier-ignore */
/* prettier-ignore-end */ }
.wsui-rotatable .is-rotatable {
transform: rotate(0);
transition: all 0.3s; }
.wsui-rotatable.is-45:hover .is-rotatable {
transform: rotate(45deg); }
.wsui-rotatable.is-90:hover .is-rotatable {
transform: rotate(90deg); }
.wsui-rotatable.is-180:hover .is-rotatable {
transform: rotate(180deg); }
.wsui-rotatable.is-270:hover .is-rotatable {
transform: rotate(270deg); }
.wsui-rotatable.is-360:hover .is-rotatable {
transform: rotate(360deg); }

/*wsui-rotatable End*/
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,10 @@
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}
},
"keywords": [
"webkit",
"sassui",
"rotatable"
]
}

0 comments on commit f91c409

Please sign in to comment.