🐞 fix: Revert admin UI style overrides, typography updates (#9)
All checks were successful
Sync TODOs with Issues / sync_todos (push) Successful in 8s
All checks were successful
Sync TODOs with Issues / sync_todos (push) Successful in 8s
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
@@ -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; }
|
|
||||||
|
|||||||
@@ -2,7 +2,16 @@
|
|||||||
|
|
||||||
@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;
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ body {
|
|||||||
@layer components {
|
@layer components {
|
||||||
h1, h2, h3,
|
h1, h2, h3,
|
||||||
h4, h5, h6 {
|
h4, h5, h6 {
|
||||||
|
font-family: var(--font-headings);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
margin: 0 0 1rem;
|
margin: 0 0 1rem;
|
||||||
}
|
}
|
||||||
@@ -130,12 +131,13 @@ p {
|
|||||||
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; }
|
||||||
|
|||||||
Reference in New Issue
Block a user