Blender-org web-assets v2 upgrade #104116
@ -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');
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user