This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm i -g gulp-cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Paste that in your Browser console | |
let allBodyElements = document.querySelectorAll('body *'), | |
thePropertyName = 'color', | |
theExpectedValue = 'rgb(0, 82, 204)'; | |
allBodyElements.forEach(function(el){ | |
let style = window.getComputedStyle(el); | |
if ( style.getPropertyValue(thePropertyName) == theExpectedValue ) { | |
console.log(el); | |
el.style.boxShadow = '0 0 0 2px red'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git ls-files | xargs wc -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
li:only-of-type { | |
width: 100%; | |
} | |
/* if 2 <ul> childs */ | |
li:nth-last-child(2):first-child, | |
li:nth-last-child(2):first-child ~ li { | |
width: 50%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
CHILD THEME functions.php file | |
*/ | |
if ( !function_exists('child_localization')) { | |
function child_localization() { | |
load_child_theme_textdomain('child_text_domain', get_stylesheet_directory() . '/lang'); | |
} | |
add_action('after_setup_theme', 'child_localization'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adds [branch id="" noscript="branch-url"] shortcode in WordPress | |
if ( ! function_exists( 'branch_embedded' ) ) { | |
function branch_embedded( $atts ) { | |
$atts = shortcode_atts( array( 'id' => '', noscript=> '' ), $atts ); | |
$output = '<script type="text/javascript" src="http://embed-script.branch.com/assets/embed/embed.m.js?body=0" data-branch-embedid="' . esc_attr( $atts['id'] ) . '" ></script>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Rating with float right or direction rtl properties | |
*/ | |
h1 { | |
text-align: center; | |
font-family: Helvetica, Arial; | |
font-weight: normal; | |
color: #777; | |
font-size: 1.3em; | |
clear: both; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Rating with float right or direction rtl properties | |
*/ | |
h1 { | |
text-align: center; | |
font-family: Helvetica, Arial; | |
font-weight: normal; | |
color: #777; | |
font-size: 1.3em; | |
clear: both; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* "Isometric" shadow | |
*/ | |
div { | |
position: relative; | |
width: 250px; | |
height: 200px; | |
background: #7799ff; | |
box-shadow: 10px 10px 0 #3355bb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Feuilles superposées | |
*/ | |
/* Petite mise en page */ | |
body { | |
width: 375px; | |
margin: 20px auto; | |
font-family: helvetica, arial, sans-serif; | |
color: #444; |