Skip to content

Commit

Permalink
Remote: moving wpcom specific styles to a different css file
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasbenedetto committed Feb 24, 2022
1 parent 685dfa6 commit f410934
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions remote/assets/styles/wpcom-theme-compat.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.highlander-enabled .wp-block-post-comments .comment-form {
display: revert;
}
14 changes: 12 additions & 2 deletions remote/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,15 @@ function remote_preload_webfonts() {
*/
require get_template_directory() . '/inc/block-patterns.php';



function wpcom_load_theme_compat_styles() {
$version = wp_get_theme( get_template() )->get( 'Version' );
$styles_path = get_template_directory_uri() . '/assets/styles/wpcom-theme-compat.css';

wp_enqueue_style( 'remote_compat_css', $styles_path, array(), $version );

// Enqueue editor styles.
add_editor_style(
array( $styles_path )
);
}
add_action( 'after_setup_theme', 'wpcom_load_theme_compat_styles' );
2 changes: 1 addition & 1 deletion remote/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ a {
border: 1px solid var(--wp--preset--color--foreground);
}

.wp-block-post-comments .comment-form:not( .highlander-enabled .wp-block-post-comments .comment-form ) {
.wp-block-post-comments .comment-form {
display: grid;
grid-template-columns: 1fr 1fr;
column-gap: var(--wp--custom--spacing--small);
Expand Down

0 comments on commit f410934

Please sign in to comment.