This file contains hidden or 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
/* stylelint-disable selector-no-qualifying-type */ | |
applet, | |
acronym, | |
bgsound, | |
dir, | |
frame, | |
frameset, | |
noframes, | |
hgroup, | |
isindex, |
This file contains hidden or 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
/* jshint node: true */ | |
'use strict'; | |
var gulp = require('gulp'), | |
$ = require('gulp-load-plugins')(), | |
atImport = require("postcss-import"); // plugin PostCSS qui "inline" les CSS importées depuis la feuille de style principale (équivalent à une concaténation en plus souple) | |
var project = { | |
configuration: { | |
browsersList: [ '> 1%', 'last 2 versions', 'IE >= 11', 'Edge >= 12'], |
This file contains hidden or 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 – informations sur node, npm, les packages locaux et de la forge npmjs.org (distants) | |
# Versions de node et npm | |
node -v | |
npm -v | |
# (local) Les packages présents dans package.json (sans leurs propres dépendances) | |
npm ls --depth=0 | |
# (local) Les packages présents dans package.json (avec toutes leurs dépendances… Long !) | |
npm ls | less |
This file contains hidden or 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
# add --global to configure all your repos (not wanted if you're using both GitHub and GitLab) | |
# Account | |
git config user.name | |
git config user.name "GitHubAccountName" # or GitLab | |
git config user.email | |
git config user.email "someEmail" # see https://github.com/settings/emails if you want to be recognized/attributed by GitHub (Settings / Emails) |
This file contains hidden or 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
taskkill /F /IM chrome.exe /T | |
# With backstopJS using chromy thus Chrome Headless, dozens of processes | |
# may still run and fill memory because they didn't finish or weren't killed. | |
# | |
# This will kill all processes with this name (and their children, kind of irrelevant here) | |
# @source http://www.markandey.com/2010/06/windows-users-can-follow-this.html | |
# @source https://www.howtogeek.com/howto/windows-vista/how-do-i-kill-all-the-iexploreexe-processes-at-once/ |
This file contains hidden or 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
// Source: https://css-tricks.com/debugging-tips-tricks/#article-header-id-10 | |
// This logs the currently focused element, useful because opening the Devtools blurs the activeElement @marcysutton | |
$('body').on('focusin', function() { | |
console.log(document.activeElement); | |
}); |
This file contains hidden or 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Techniques for WCAG 2.0 (and only them)</title> | |
<style> | |
body { | |
margin: 0; | |
padding-bottom: 2em; | |
font-family: sans-serif; |
This file contains hidden or 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
// Source: https://stackoverflow.com/q/18663941/137626 (answers #1 Ales and #2 Joon) | |
function sgClosest(el, selector) { | |
var matchesFn; | |
// find vendor prefix (@NOTE-phv Limited to MS here, other prefixes are ditched) | |
['matches', 'msMatchesSelector'].some( function (fn) { | |
if (typeof document.body[fn] == 'function') { | |
matchesFn = fn; | |
return true; | |
} |
This file contains hidden or 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
// Browserslist : chaîne des navigateurs supportés, paramètrage pour Autoprefixer | |
// Annoncé : IE11+, last Chr/Fx/Edge/Opera et iOS 9+, Android 5+) | |
// Ici IE10+, Safari 8+, Android 4.4+ | |
// => Couverture (mondiale, pas française) de 95,13% (mai 2017) | |
browsersList: [ | |
'> 1%', | |
'last 2 versions', | |
'IE >= 10', 'Edge >= 12', | |
'Chrome >= 42', | |
'Firefox >= 42', 'Firefox ESR', |
This file contains hidden or 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
/* | |
* User selecting text: custom colors | |
* Beware of white text on dark background: you must redefine ::selection for these cases | |
* | |
* MDN: https://developer.mozilla.org/fr/docs/Web/CSS/::selection | |
* Autoprefixer does take care of adding needed -moz- prefix | |
* | |
*/ | |
::selection { | |
color: white; |