Skip to content

Instantly share code, notes, and snippets.

View frankyonnetti's full-sized avatar

Frank Yonnetti frankyonnetti

View GitHub Profile
@frankyonnetti
frankyonnetti / webkit-appearance-definitions.css
Last active May 23, 2021 21:05
Webkit - appearance #webkit #css
/*
-webkit-appearance: definitions
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Webkit_Extensions
*/
/*
Only apply to touch devices.
Font-size at 16px avoids the automatic screen zooming.
*/
html.touch select,
@frankyonnetti
frankyonnetti / wordpress-theme-path.php
Last active February 17, 2021 03:57
WordPress - Directory (stylesheet) theme path #wordpress
# parent theme
<?php bloginfo('template_directory'); ?>
# child theme
<?php bloginfo('stylesheet_directory'); ?>
@frankyonnetti
frankyonnetti / wordpress-if_page_template.php
Last active February 17, 2021 03:56
WordPress - if_page_template #wordpress
<?php
if ( is_page_template('page-about.php') ) {
// Returns true when 'page-about.php' is being used.
} else {
// Returns false when 'page-about.php' is not being used.
}
?>
@frankyonnetti
frankyonnetti / retina-ready-mixin.scss
Last active February 17, 2021 03:56
Scss - retina @2x mixin #scss #retina
// easy retina-ready images
// http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss
@mixin image-2x($image, $width, $height) {
@media (-webkit-min-device-pixel-ratio: 2),
(min--moz-device-pixel-ratio: 2),
(-o-min-device-pixel-ratio: 2/1),
(min-device-pixel-ratio: 2),
(min-resolution: 192dpi),
(min-resolution: 2dppx) {
/* on retina, use image that's scaled by 2 */
@frankyonnetti
frankyonnetti / CSS--ie_hacks2.css
Last active May 22, 2021 22:42
#css IE version targeting hacks 2
/* https://stackoverflow.com/a/27315792 */
/* IE 6 */
* html .ie6 {
property: value;
}
/* or */
.ie6 {
_property: value;
}
@frankyonnetti
frankyonnetti / ie-hacks1.css
Last active February 17, 2021 03:55
CSS - IE version targeting hacks 1 #css #ie
/* IE 7 only hack */
*:first-child+html #myDiv { definition }
/* IE 7 and below hacks */
*:first-child+html #myDiv,
* html #myDiv { definition }
/* IE 6 and below hacks */
* html #myDiv { definition }
@frankyonnetti
frankyonnetti / ie-italics-fix.css
Last active February 17, 2021 03:54
CSS - IE italics box-model fix #css #ie
* html p {
overflow: visible;
zoom: 1;
}
@frankyonnetti
frankyonnetti / ie-image-smoothing.css
Last active February 17, 2021 03:53
CSS - smooth image resizing in IE #css #ie
img {
-ms-interpolation-mode: bicubic;
}
@frankyonnetti
frankyonnetti / bbedit-grep.txt
Last active February 17, 2021 03:52
BBEdit - grep #bbedit #grep
Search: <BIG>(.*)</BIG>
Replace: <FONT SIZE="+1">\1</FONT>
OR
Search: <BIG>([^<]*)<BIG>
Replace: <FONT SIZE="+1">\1</FONT>
@frankyonnetti
frankyonnetti / drupal6-display-viewblock.php
Last active February 17, 2021 03:52
Drupal 6 - display view block #drupal #d6
<?php
$block = module_invoke('views', 'block', 'view', 'BLOCK-NAME-block_10');
if ($block['content']) { ?>
<div class="name">
<?php
print $block['content'];
?>
</div>
<?php } ?>