🐞 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() { public function __construct() {
add_action( 'wp_enqueue_scripts', array( $this, 'enqFEAssets' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'enqFEAssets' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'enqBEAssets' ) ); 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_dir = get_stylesheet_directory();
$theme_uri = get_stylesheet_directory_uri(); $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' ); $font_ver = gmdate( 'U' );
wp_enqueue_style( 'raleway', 'https://fonts.googleapis.com/css2?family=Raleway:wght@100..900&display=swap', false, $font_ver ); 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 ); 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. // 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,9 +2,18 @@
@import "../../static/dist/theme.css"; @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 { .wp-block-buttons .block-editor-block-list__layout {
display: flex; display: flex;
gap: 1rem; gap: 1rem;
} }

View File

@@ -68,74 +68,76 @@
} }
body { body {
background-color: white; background-color: white;
color: black; color: black;
font-family: var(--font-sans); font-family: var(--font-sans);
font-size: var(--text-base); font-size: var(--text-base);
line-height: var(--line-height); line-height: var(--line-height);
} }
::selection { background: var(--color-warning); } ::selection { background: var(--color-warning); }
@layer components { @layer components {
h1, h2, h3, h1, h2, h3,
h4, h5, h6 { h4, h5, h6 {
font-weight: 700; font-family: var(--font-headings);
margin: 0 0 1rem; font-weight: 700;
} margin: 0 0 1rem;
}
h1, .h1 { h1, .h1 {
font-size: var(--h1); font-size: var(--h1);
line-height: 1.2; line-height: 1.2;
} }
h2, .h2 { h2, .h2 {
font-size: var(--h2); font-size: var(--h2);
line-height: 1.3; line-height: 1.3;
} }
h3, .h3 { h3, .h3 {
font-size: var(--h3); font-size: var(--h3);
line-height: 1.4; line-height: 1.4;
} }
h4, .h4 { h4, .h4 {
font-size: var(--h4); font-size: var(--h4);
line-height: 1.5; line-height: 1.5;
} }
h5, .h5 { font-size: var(--h5); } h5, .h5 { font-size: var(--h5); }
h6, .h6 { font-size: var(--h6); } h6, .h6 { font-size: var(--h6); }
} }
a, .link { a, .link {
color: var(--color-bodylinks); color: var(--color-bodylinks);
text-decoration: none; text-decoration: none;
transition: color 200ms; transition: color 200ms;
cursor: pointer; cursor: pointer;
&:hover { color: var(--color-primary); } &:hover { color: var(--color-primary); }
} }
h1 a, .h1 a, h1 a, .h1 a,
h2 a, .h2 a, h2 a, .h2 a,
h3 a, .h3 a { h3 a, .h3 a {
color: inherit; color: inherit;
text-decoration: underline; text-decoration: underline;
} }
p { p {
margin-top: 0; margin-top: 0;
margin-bottom: 1rem; margin-bottom: 1rem;
} }
li ul, li ol { margin: 0 1rem; }
ul { list-style-type: disc; } ul { list-style-type: disc; }
ol { list-style-type: decimal; } ol { list-style-type: decimal; }
li ul, li ol { margin: 0 1rem; }
ol ol { list-style: lower-alpha; } ol ol { list-style: lower-alpha; }
ol ol ol { list-style: lower-roman; } ol ol ol { list-style: lower-roman; }
@@ -146,16 +148,16 @@ pre, code,
samp, style { font-family: monospace; } samp, style { font-family: monospace; }
pre { pre {
font-size: 0.875rem; font-size: 0.875rem;
overflow: auto; overflow: auto;
padding: 1.5rem; padding: 1.5rem;
} }
pre code { pre code {
background-color: inherit; background-color: inherit;
border-radius: 0; border-radius: 0;
color: inherit; color: inherit;
padding: 0; padding: 0;
} }
code { code {
@@ -163,10 +165,10 @@ code {
} }
hr { hr {
background-color: black; background-color: black;
border: none; border: none;
display: block; display: block;
height: 1px; height: 1px;
margin: 1rem 0; margin: 1rem 0;
width: 100%; width: 100%;
} }