##Sass Functions Cheat Sheet
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 | |
//don't re add the php tag above | |
add_filter('wp_link_query', 'cab_add_custom_post_type_archive_link', 10, 2); | |
/** | |
* Add Custom Post Type archive to WordPress search link query | |
* Author: https://github.com/mthchz/editor-archive-post-link/blob/master/editor-archive-post-link.php | |
*/ | |
function cab_add_custom_post_type_archive_link( $results, $query ) { |
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
/* ---- | |
css custom properties to manipulate color | |
MIT - 2017 - Soft Punch | |
https://gist.github.com/softpunch/ | |
set initial "main" color via HSL values. | |
automatically calculate harmonies and variations of that color with pure css. | |
harmonies are determined solely by hue. |
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 | |
/** | |
* Sets up theme defaults and registers support for various WordPress features. | |
* | |
* Note that this function is hooked into the after_setup_theme hook, which | |
* runs before the init hook. The init hook is too late for some features, such | |
* as indicating support for post thumbnails. | |
*/ | |
function aperture_setup() { |
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
@function cmyk_black($color) { | |
@return 1 - max(red($color), green($color), blue($color)) / 255; | |
} | |
@function cmyk_cyan($color) { | |
$black: cmyk_black($color); | |
@return if($black < 1, 1 - red($color) / 255 / (1 - $black), 0); | |
} | |
@function cmyk_magenta($color) { | |
$black: cmyk_black($color); |