Skip to content

Instantly share code, notes, and snippets.

@bookwyrm
Last active August 29, 2015 14:19
Show Gist options
  • Save bookwyrm/c5c12fd6811a00f65aff to your computer and use it in GitHub Desktop.
Save bookwyrm/c5c12fd6811a00f65aff to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
.item
%span Here is an item!
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// Scut (v1.1.2)
// ----
@import "scut";
@import "compass/css3/transition";
@import "compass/css3/transform";
.item {
@include transition(background 500ms);
@include scut-margin(20px n n 60px);
width: 200px;
background: red;
text-align: center;
color: #fff;
line-height: 40px;
font-family: arial;
font-size: 20px;
&:hover {
background: blue;
@include transform(scale3d(1.5, 1.5, 1.5));
html.no-transform3d & {
@include transform(scale(1.5));
}
body.products-section & {
@include transform(scale3d(1.2, 1.2, 1.2));
background: green;
html.no-transform3d & {
@include transform(scale(1.2));
}
}
}
}
/*
* Scut, a collection of Sass utilities
* to ease and improve our implementations of common style-code patterns.
* v1.1.2
* Docs at http://davidtheclark.github.io/scut
*/
.item {
-moz-transition: background 500ms;
-o-transition: background 500ms;
-webkit-transition: background 500ms;
transition: background 500ms;
margin-top: 20px;
margin-left: 60px;
width: 200px;
background: red;
text-align: center;
color: #fff;
line-height: 40px;
font-family: arial;
font-size: 20px;
}
.item:hover {
background: blue;
-moz-transform: scale3d(1.5, 1.5, 1.5);
-ms-transform: scale3d(1.5, 1.5, 1.5);
-webkit-transform: scale3d(1.5, 1.5, 1.5);
transform: scale3d(1.5, 1.5, 1.5);
}
html.no-transform3d .item:hover {
-moz-transform: scale(1.5);
-ms-transform: scale(1.5);
-webkit-transform: scale(1.5);
transform: scale(1.5);
}
body.products-section .item:hover {
-moz-transform: scale3d(1.2, 1.2, 1.2);
-ms-transform: scale3d(1.2, 1.2, 1.2);
-webkit-transform: scale3d(1.2, 1.2, 1.2);
transform: scale3d(1.2, 1.2, 1.2);
background: green;
}
html.no-transform3d body.products-section .item:hover {
-moz-transform: scale(1.2);
-ms-transform: scale(1.2);
-webkit-transform: scale(1.2);
transform: scale(1.2);
}
<div class='item'>
<span>Here is an item!</span>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment