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
/* put tasks.json in '__WORKINGDIRECTORY__/.vscode/' */ | |
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"type": "shell", | |
"label": "Run Browsersync", | |
"command": "browser-sync start --f \"*.*\" --proxy \"__URL__.local\"", | |
"problemMatcher": [], |
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
/* fix block images aspect ratio bug */ | |
.wp-block-image img, .wp-block-image svg { | |
max-width:100%; | |
height:auto; | |
} |
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 SVG to allowed file uploads | |
**/ | |
function add_file_types_to_uploads($file_types){ | |
$new_filetypes = array(); | |
$new_filetypes['svg'] = 'image/svg+xml'; | |
$file_types = array_merge($file_types, $new_filetypes ); | |
return $file_types; |
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
/* https://www.smashingmagazine.com/2015/12/responsive-images-in-wordpress-core/ */ | |
function adjust_image_sizes_attr( $sizes, $size ) { | |
$sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px'; | |
return $sizes; | |
} | |
add_filter( 'wp_calculate_image_sizes', 'adjust_image_sizes_attr', 10 , 2 ); |
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
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width"> |
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
glyphhanger --subset=*.ttf --formats=woff2 --LATIN |
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
.wrapper { | |
display: grid; | |
grid-template-columns: 1fr minmax(auto, 20em) 1fr; | |
} | |
.wrapper > * { | |
grid-column: 2 / -2; | |
} |
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
import Test from './Test.svelte'; | |
// Mount Svelte component | |
const test = new Test({ | |
target: document.querySelector('#test') | |
}); |
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
a:not([class]) { | |
/* Relatively sized thickness and offset */ | |
text-decoration-thickness: max(0.08em, 1px); | |
text-underline-offset: 0.15em; | |
} | |
/* https://moderncss.dev/modern-css-for-dynamic-component-based-architecture/ */ |
OlderNewer