Skip to content

Instantly share code, notes, and snippets.

View dmao's full-sized avatar

Didier Mahaux dmao

View GitHub Profile
@dmao
dmao / CSS-links.md
Last active October 21, 2022 08:14
Learning CSS Link

Keybase proof

I hereby claim:

  • I am dmao on github.
  • I am didmao (https://keybase.io/didmao) on keybase.
  • I have a public key ASBz2pLQzgIED3qwy8oejKO09CmQt9Jxjk8aLfKP6D3OMQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am dmao on github.
  • I am xwp_dmao (https://keybase.io/xwp_dmao) on keybase.
  • I have a public key ASDov8EGUebqXxm-wRxU37JcQFdpBQhVqcThA6BGSjHwyAo

To claim this, I am signing this object:

@dmao
dmao / what-forces-layout.md
Created September 23, 2015 07:28 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@dmao
dmao / wp-rights
Created September 11, 2013 07:52
Give right to wordpress folder in local
sudo chown -R _www wordpress
sudo chmod -R g+w wordpress
@dmao
dmao / robust-p
Created September 6, 2013 10:08
Paragraph with indentation
p{
margin-bottom:20px;
}
p+p{
text-indent:2em;
margin-top:-20px;
}
@dmao
dmao / custom.js
Created August 8, 2013 12:17 — forked from drewjoh/custom.js
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').click(function(e) {
e.preventDefault();
var url = $(this).attr('href');
if (url.indexOf('#') == 0) {
$(url).modal('open');
} else {
@dmao
dmao / scale-image
Last active December 18, 2015 17:59
Proportionally scale images that have dimension attributes
// http://www.456bereastreet.com/archive/201306/how_to_proportionally_scale_images_that_have_dimension_attributes/
img {
width:auto; // for IE8
max-width:100%;
height:auto;
}
@dmao
dmao / ligature
Created June 19, 2013 10:03
Activate ligature
h1 {
-moz-font-feature-settings: "liga=1, dlig=1";
-ms-font-feature-settings: "liga", "dlig";
-webkit-font-feature-settings: "liga", "dlig";
-o-font-feature-settings: "liga", "dlig";
font-feature-settings: "liga", "dlig";
}
@dmao
dmao / .bash_profile
Created June 18, 2013 10:47
my .bash_profile
## use the Mamp version of php
export PATH=/Applications/MAMP/bin/php/php5.4.4/bin:$PATH
## Alias
alias compass-prod='compass compile --output-style compressed --force'
alias ..='cd ..'
alias l="ls -al"
alias ?='pwd'
alias web='cd /Applications/MAMP/htdocs'