🐞 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.

View File

@@ -1,16 +1,2 @@
/* Theme admin styles */
/* Light admin styles; avoid overriding core wp-admin UI */
@import "../../static/dist/theme.css";
body {
font-family: 'Raleway', sans-serif;
#wpwrap {
@layer utilities {
table.fixed { table-layout: fixed; position: static; }
}
}
}
#wpbody ul, ol, ul li, ol li { list-style-type: none; }
#adminmenu li ul, li ol { margin: 0; }

View File

@@ -2,7 +2,16 @@
@import "../../static/dist/theme.css";
body { font-family: 'Raleway', sans-serif; }
body {
font-family: var(--font-sans);
h1, h2, h3,
h4, h5, h6 {
font-family: var(--font-headings);
font-weight: 700;
margin: 0 0 1rem;
}
}
.wp-block-buttons .block-editor-block-list__layout {
display: flex;

View File

@@ -80,6 +80,7 @@ body {
@layer components {
h1, h2, h3,
h4, h5, h6 {
font-family: var(--font-headings);
font-weight: 700;
margin: 0 0 1rem;
}
@@ -130,12 +131,13 @@ p {
margin-bottom: 1rem;
}
li ul, li ol { margin: 0 1rem; }
ul { list-style-type: disc; }
ol { list-style-type: decimal; }
li ul, li ol { margin: 0 1rem; }
ol ol { list-style: lower-alpha; }
ol ol ol { list-style: lower-roman; }