Skip to content

Instantly share code, notes, and snippets.

@matteotrap
matteotrap / dropdown
Created August 27, 2013 10:23
Disable browser focus on Bootstrap dropdown links
a.dropdown-toggle {
outline: none
}
@matteotrap
matteotrap / functions.php
Created July 22, 2013 08:48 — forked from setola/functions.php
Bootstrap Navbar in Wordpress (Custom Walker)
class BootstrapNavMenuWalker extends Walker_Nav_Menu
{
function start_lvl( &$output, $depth ) {
$indent = str_repeat( "\t", $depth );
$submenu = ($depth > 0) ? ' sub-menu' : '';
$output .= "\n$indent<ul class=\"dropdown-menu$submenu depth_$depth\">\n";
}
@matteotrap
matteotrap / placeholder
Created July 4, 2013 13:33
HTML5 Placeholder Color
::-webkit-input-placeholder { /* WebKit browsers */
color: #F00;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #F00;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #F00;
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
@matteotrap
matteotrap / ie-conditional-tags
Created June 21, 2013 14:53
Internet Explorer Conditional HTML tags
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
<!--[if IE 7 ]> <html class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]-->
@matteotrap
matteotrap / wpml
Last active April 12, 2024 22:38
WPML - Active Languages list
<?php
$languages = icl_get_languages();
foreach($languages as $l){
$langs[] = '<li><a href="'.$l['url'].'">'.$l['native_name'].'</a></li>';
}
echo join('', $langs);
?>
@matteotrap
matteotrap / pagenavi
Created June 13, 2013 16:53
Pagenavi base styles
.wp-pagenavi
{
text-align: center;
font-size: 20px;
font-weight: bold;
line-height: 120%;
color:rgb(209,31,31);
padding-top: 30px;
padding-bottom: 40px;
@matteotrap
matteotrap / wp-image-markup
Last active December 18, 2015 09:48
WP Base image markup styles
.alignleft
{
float: left;
margin-right: 10px;
margin-bottom: 10px;
margin-top: 10px;
}
.alignright
{
float: right;
@matteotrap
matteotrap / media-query
Created June 10, 2013 16:34
Base Responsive Media Queries
/* Desktop specific */
@media (max-width: 979px)
{
}
/* Large desktop */
@media (min-width: 1200px) {
}