Skip to content

Instantly share code, notes, and snippets.

View LucaRosaldi's full-sized avatar

Luca Rosaldi LucaRosaldi

View GitHub Profile
@LucaRosaldi
LucaRosaldi / no-focus-outline.css
Last active November 7, 2017 11:29 — forked from davidgilbertson/user-tabbing-class.js
JS-CSS: Remove Outline on Focus (accessible)
html:not(.no-js):not(.user-is-tabbing) button:focus,
html:not(.no-js):not(.user-is-tabbing) input:focus,
html:not(.no-js):not(.user-is-tabbing) select:focus,
html:not(.no-js):not(.user-is-tabbing) textarea:focus {
outline: none;
}
@LucaRosaldi
LucaRosaldi / closure.js
Last active August 5, 2016 10:47 — forked from paulirish/gist:315916
javascript: Closure
/**
* Javascript closure.
*/
( function( window, document, undefined ) {
'use strict';
// do something
} )( window, window.document );
@LucaRosaldi
LucaRosaldi / dabblet.css
Created March 18, 2013 18:17 — forked from LeaVerou/dabblet.css
CSS: iOS 6 style switch checkboxes
/**
* iOS 6 style switch checkboxes
* by Lea Verou http://lea.verou.me
*/
:root input[type="checkbox"] { /* :root here acting as a filter for older browsers */
position: absolute;
opacity: 0;
}
@LucaRosaldi
LucaRosaldi / coverflow.html
Last active December 10, 2015 18:18 — forked from anonymous/index.html
CSS: Cover Flow
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>CSS3 CoverFlow</title>
<link rel="stylesheet" href="css/coverflow.css">
@LucaRosaldi
LucaRosaldi / functions.php
Created December 17, 2012 11:00 — forked from jmdodd/gist:1139941
WP: Add human-readable classes to wp_nav_menu
<?php
if ( ! function_exists( 'ucc_nav_menu_css_class' ) ) {
function ucc_nav_menu_css_class( $classes, $item, $args ) {
$class = sanitize_title( $item->title );
$classes[] = 'menu-item-' . $class;
return $classes;
} }
add_filter( 'nav_menu_css_class', 'ucc_nav_menu_css_class', 10, 3 );
@LucaRosaldi
LucaRosaldi / functions.php
Created December 17, 2012 10:41 — forked from jmdodd/gist:1695468
WP: Add Custom Post types to main Query.
<?php
if ( ! function_exists( 'ucc_add_cpts_to_pre_get_posts' ) ) {
function ucc_add_cpts_to_pre_get_posts( $query ) {
if ( $query->is_main_query() && ! is_post_type_archive() && ! is_singular() && ! is_404() ) {
$my_post_type = get_query_var( 'post_type' );
if ( empty( $my_post_type ) ) {
$args = array(
'exclude_from_search' => false,
'public' => true,
@LucaRosaldi
LucaRosaldi / mq.css
Created October 8, 2012 07:20 — forked from chriscoyier/mq.css
CSS: Media Queries
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
@LucaRosaldi
LucaRosaldi / Elenco Province Italiane
Last active November 27, 2023 14:52
Elenco Province Italiane in vari formati: HTML, PHP, JSON, TXT, Pipe notation (es. Elementor).
# Fonte: Wikipedia
# URL: https://it.wikipedia.org/wiki/Province_d%27Italia
# Aggiornato al: 2022
Agrigento
Alessandria
Ancona
Aosta
Arezzo
Ascoli Piceno