Blender-org web-assets v2 upgrade #104116

Merged
Márton Lente merged 56 commits from web-assets-v2-upgrade into main 2024-08-13 17:27:59 +02:00
Showing only changes of commit 9620e7f417 - Show all commits

View File

@ -913,4 +913,13 @@ function format_bytes($size, $precision = 2)
return round(pow(1024, $base - floor($base)), $precision) .' '. $suffixes[floor($base)]; return round(pow(1024, $base - floor($base)), $precision) .' '. $suffixes[floor($base)];
} }
// Map WordPress block editor font-sizes to Blender Web Assets rem sizing
function bwa_map_block_editor_font_sizes() {
$custom_css = 'html { font-size: 62.5%; }';
wp_add_inline_style('wp-block-editor', $custom_css);
}
// Hook function "bwa_map_block_editor_font_sizes" to enqueue_block_editor_assets
add_action('enqueue_block_editor_assets', 'bwa_map_block_editor_font_sizes');
?> ?>