Skip to content

Instantly share code, notes, and snippets.

@csakiistvan
Created August 5, 2014 07:39
Show Gist options
  • Save csakiistvan/003aad80d2dd708caad2 to your computer and use it in GitHub Desktop.
Save csakiistvan/003aad80d2dd708caad2 to your computer and use it in GitHub Desktop.
icheck settings
/* iCheck plugin Flat skin, ip
----------------------------------- */
.icheckbox_flat-ip,
.iradio_flat-ip {
display: inline-block;
*display: inline;
vertical-align: middle;
margin: 0;
padding: 0;
@include iv-sprite-background();
@include iv-sprite(17px, 20px, 0 0);
border: none;
cursor: pointer;
}
.icheckbox_flat-ip {
background-position: 0 -154px;
&:hover {
background-position: -19px -154px;
}
&.checked {
background-position: -38px -154px;
&:hover {
background-position: -95px -154px;
}
}
&.disabled {
background-position: -58px -154px;
cursor: default;
}
&.checked.disabled {
background-position: -77px -154px;
}
}
.iradio_flat-ip {
background-position: 0 -173px;
&:hover {
background-position: -19px -173px;
}
&.checked {
background-position: -38px -173px;
&:hover {
background-position: -95px -173px;
}
}
&.disabled {
background-position: -58px -173px;
cursor: default;
}
&.checked.disabled {
background-position: -77px -173px;
}
}
.error .icheckbox_flat-ip {
background-position: -114px -108px;
&.checked {
background-position: -38px -108px;
&:hover {
background-position: -95px -108px;
}
}
}
.error .iradio_flat-ip {
background-position: -114px -129px;
&.checked {
background-position: -38px -129px;
&:hover {
background-position: -95px -129px;
}
}
}
(function ($, window, document) {
Drupal.behaviors.project_theme = {
attach: function (context) {
$('.element input').iCheck({
checkboxClass: 'icheckbox_flat-ip',
radioClass: 'iradio_flat-ip',
increaseArea: '20%' // optional
});
};
})(jQuery, window, document);
libraries[icheck][download][type] = "get"
libraries[icheck][download][url] = "https://github.com/fronteed/iCheck/archive/master.zip"
libraries[icheck][destination] = "../../profiles/project/themes/project_theme/lib"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment