Skip to content

Instantly share code, notes, and snippets.

View frankyonnetti's full-sized avatar

Frank Yonnetti frankyonnetti

View GitHub Profile
@frankyonnetti
frankyonnetti / CSS--material-colors.scss
Created May 22, 2021 22:44
#sass Material Design Colors
// https://github.com/shuhei/material-colors/blob/master/dist/colors.scss
$md-red-50: #ffebee;
$md-red-100: #ffcdd2;
$md-red-200: #ef9a9a;
$md-red-300: #e57373;
$md-red-400: #ef5350;
$md-red-500: #f44336;
$md-red-600: #e53935;
$md-red-700: #d32f2f;
@frankyonnetti
frankyonnetti / CSS--ios-retina-cover.css
Created May 22, 2021 22:43
#sass #iOS retina background images instead of css3 cover
/* for background-size:cover replacement on iOS devices */
@media only screen and (orientation: portrait) and (device-width: 320px), (device-width: 768px) {
div {
-webkit-background-size: auto 150%;
background-attachment: scroll;
}
}
// https://glyphicons.com
.mytextwithicon {
padding-left: 15px;
position: relative;
}
.mytextwithicon::before {
font-family: 'Glyphicons Halflings';
content: '\e001';
.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}
echo 'Hello World!' | pbcopy
echo `pbpaste`
@include media-breakpoint-up(xs) { }
@include media-breakpoint-up(sm) { } // min-width 576px
@include media-breakpoint-up(md) { } // min-width 769px
@include media-breakpoint-up(lg) { } // min-width 993px
@include media-breakpoint-up(xl) { } // min-width 1201px
@frankyonnetti
frankyonnetti / javascript.js
Last active May 22, 2021 19:45
Javascript snippets #javascript #vanilla
/**
* Bookmarks
*
* https://plainjs.com/javascript/
* https://htmldom.dev/
* https://javascript.info/
* https://www.javascripttutorial.net/snippets/
* https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript/
*
*/
@frankyonnetti
frankyonnetti / wordpress-custom-image-sizes.php
Last active February 17, 2021 00:16
WordPress - custom image sizes #wordpress #images
<?php
/**
* Custom image sizes.
* https: //developer.wordpress.org/reference/functions/add_image_size/
*/
function THEMENAME_image_size() {
add_image_size( 'card-author', 130, 110, true ); // true = cropped
add_image_size( 'two-column-img', 800 ); // 800 pixels wide with unlimited height
@frankyonnetti
frankyonnetti / wordpress-ACF-foreach-array.php
Last active February 17, 2021 00:18
WordPress - ACF for each array #wordpress #acf #array #foreach
<?php if (have_rows('price_table_row_with_columns')): ?>
<?php while (have_rows('price_table_row_with_columns')): the_row();
$row_columns = array(
get_sub_field('row_column_2'),
get_sub_field('row_column_3'),
get_sub_field('row_column_4'));
?>
<div class="pricing-table-row">