Skip to content

Instantly share code, notes, and snippets.

View zetareticoli's full-sized avatar
👨‍💻
Building stuff on the web

Francesco Improta zetareticoli

👨‍💻
Building stuff on the web
View GitHub Profile
@zetareticoli
zetareticoli / gist:f2e852c99574fb7ed6c2d3c871742eb1
Created January 12, 2021 17:55
Force git to use config settings
git config --global user.useConfigOnly true
@zetareticoli
zetareticoli / grid-horizontal-scroll.css
Created April 27, 2020 15:14
Horizontal scroll with grid
.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 April 3, 2020 07:37
Update the local list of remote branches
git remote update origin --prune
# Pattern name
Succinct description of the pattern
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ::
:: Live Pattern Demo ::
:: ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@zetareticoli
zetareticoli / Toggle visibility
Created December 2, 2014 15:55
Trigger event click on a button which makes something visible.
$('.button').click(function(event){
event.stopPropagation();
event.preventDefault();
$(this).toggleClass("clicked");
$('.element').toggleClass("visible");
});
@zetareticoli
zetareticoli / gist:a3db665447ffef19bdf4
Created November 26, 2014 08:52
Remove outline from select focus on Firefox
select:-moz-focusring {
color: transparent;
text-shadow: 0 0 0 #000;
}
@zetareticoli
zetareticoli / scrollTop
Created May 15, 2014 12:31
Add/Remove class when scrolling page
$(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 15:42
A Pen by Francesco Improta.
@zetareticoli
zetareticoli / crossbrowser-placeholder
Created December 16, 2013 15:51
Cross-Browser HTML5 Placeholder Text
<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 December 16, 2013 13:55
IE 8: background-size fix
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/logo.gif',
sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/logo.gif',
sizingMethod='scale')";