🐞 fix: Revert admin UI style overrides, typography updates (#9)
All checks were successful
Sync TODOs with Issues / sync_todos (push) Successful in 8s

This commit is contained in:
Keith Solomon
2026-03-04 08:55:15 -06:00
committed by GitHub
parent 3ef6385935
commit 5b7fed2cb8
4 changed files with 85 additions and 78 deletions

View File

@@ -23,6 +23,7 @@ class Enqueue {
public function __construct() {
add_action( 'wp_enqueue_scripts', array( $this, 'enqFEAssets' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'enqBEAssets' ) );
add_action( 'enqueue_block_editor_assets', array( $this, 'enqEditorAssets' ) );
}
/**
@@ -64,15 +65,6 @@ class Enqueue {
$theme_dir = get_stylesheet_directory();
$theme_uri = get_stylesheet_directory_uri();
/**
* Editor CSS
*/
$editor_css_path = '/styles/backend/editor.css';
if ( file_exists( $theme_dir . $editor_css_path ) ) {
$version = filemtime( $theme_dir . $editor_css_path );
wp_enqueue_style( 'basicwp-editor', $theme_uri . $editor_css_path, array(), $version );
}
$font_ver = gmdate( 'U' );
wp_enqueue_style( 'raleway', 'https://fonts.googleapis.com/css2?family=Raleway:wght@100..900&display=swap', false, $font_ver );
@@ -96,6 +88,24 @@ class Enqueue {
wp_enqueue_script_module( 'basicwp-button', $theme_uri . '/static/js/components/button.js', array( 'basicwp-admin' ), $version );
}
}
/**
* Enqueue block editor CSS (scoped to editor to avoid leaking into wp-admin UI).
*/
public function enqEditorAssets() {
$theme_dir = get_stylesheet_directory();
$theme_uri = get_stylesheet_directory_uri();
$editor_css_path = '/styles/backend/editor.css';
$font_ver = gmdate( 'U' );
wp_enqueue_style( 'raleway', 'https://fonts.googleapis.com/css2?family=Raleway:wght@100..900&display=swap', false, $font_ver );
if ( file_exists( $theme_dir . $editor_css_path ) ) {
$version = filemtime( $theme_dir . $editor_css_path );
wp_enqueue_style( 'basicwp-editor', $theme_uri . $editor_css_path, array(), $version );
}
}
}
// Initialize the Enqueue class.