Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modularize CSS #364

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/phpcs.xml
node_modules/
vendor/
mix.js.map

# Artifacts
process.yml
Expand Down
14 changes: 12 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ function genesis_child_gutenberg_support() { // phpcs:ignore WordPress.NamingCon
genesis_register_responsive_menus( genesis_get_config( 'responsive-menus' ) );
}

// Needed in order to enqueue stylesheet with our own versioning.
remove_action( 'genesis_meta', 'genesis_load_stylesheet' );

add_action( 'wp_enqueue_scripts', 'genesis_sample_enqueue_scripts_styles' );
/**
* Enqueues scripts and styles.
Expand All @@ -71,6 +74,13 @@ function genesis_sample_enqueue_scripts_styles() {

$appearance = genesis_get_config( 'appearance' );

wp_enqueue_style(
genesis_get_theme_handle(),
genesis_sample_get_compiled_asset_url( '/style.css' ),
false,
null
);

wp_enqueue_style(
genesis_get_theme_handle() . '-fonts',
$appearance['fonts-url'],
Expand All @@ -83,9 +93,9 @@ function genesis_sample_enqueue_scripts_styles() {
if ( genesis_is_amp() ) {
wp_enqueue_style(
genesis_get_theme_handle() . '-amp',
get_stylesheet_directory_uri() . '/lib/amp/amp.css',
genesis_sample_get_compiled_asset_url( '/lib/amp/amp.css' ),
[ genesis_get_theme_handle() ],
genesis_get_theme_version()
null
);
}

Expand Down
9 changes: 3 additions & 6 deletions lib/amp/amp.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/amp/amp.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 24 additions & 50 deletions lib/gutenberg/front-end.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading