Skip to content

Instantly share code, notes, and snippets.

Avatar

Francesco Improta zetareticoli

View GitHub Profile
View grid-horizontal-scroll.css
.parent {
display: grid;
grid-gap: 16px;
padding: 16px;
grid-template-columns: repeat(auto-fill,minmax(160px,1fr));
grid-auto-flow: column;
grid-auto-columns: minmax(160px,1fr);
overflow-x: auto;
}
@zetareticoli
zetareticoli / gist:71b3ea255628d988e1e725155ea8bcf7
Created Apr 3, 2020
Update the local list of remote branches
View gist:71b3ea255628d988e1e725155ea8bcf7
git remote update origin --prune
View gist:e1f192885e6eabc62178a3a693d29c92
# Pattern name
Succinct description of the pattern
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ::
:: Live Pattern Demo ::
:: ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@zetareticoli
zetareticoli / Toggle visibility
Created Dec 2, 2014
Trigger event click on a button which makes something visible.
View Toggle visibility
$('.button').click(function(event){
event.stopPropagation();
event.preventDefault();
$(this).toggleClass("clicked");
$('.element').toggleClass("visible");
});
@zetareticoli
zetareticoli / gist:a3db665447ffef19bdf4
Created Nov 26, 2014
Remove outline from select focus on Firefox
View gist:a3db665447ffef19bdf4
select:-moz-focusring {
color: transparent;
text-shadow: 0 0 0 #000;
}
@zetareticoli
zetareticoli / scrollTop
Created May 15, 2014
Add/Remove class when scrolling page
View scrollTop
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll >= 160) {
$(".primary-navbar").addClass("navbar-fixed-top");
}
else {
$(".primary-navbar").removeClass("navbar-fixed-top");
}
});
@zetareticoli
zetareticoli / Fluid-Grid.markdown
Created May 5, 2014
A Pen by Francesco Improta.
View Fluid-Grid.markdown
@zetareticoli
zetareticoli / crossbrowser-placeholder
Created Dec 16, 2013
Cross-Browser HTML5 Placeholder Text
View crossbrowser-placeholder
<script src="jquery.js"></script>
<script src="modernizr.js"></script>
<script>
$(document).ready(function(){
if(!Modernizr.input.placeholder){
$('[placeholder]').focus(function() {
var input = $(this);
@zetareticoli
zetareticoli / css-backgroundsize-ie
Created Dec 16, 2013
IE 8: background-size fix
View css-backgroundsize-ie
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/logo.gif',
sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/logo.gif',
sizingMethod='scale')";
@zetareticoli
zetareticoli / flexslider.counter
Created Nov 15, 2013
Flexslider slides counter
View flexslider.counter
<script type="text/javascript" charset="utf-8">
$(window).load(function() {
$('.flexslider').flexslider({
animation: "slide",
controlsContainer: ".flex-container",
start: function(slider) {
$('.total-slides').text(slider.count);
},
after: function(slider) {
$('.current-slide').text(slider.currentSlide);
You can’t perform that action at this time.