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

Header/Footer: Modularize CSS files and process with PostCSS. #6

Merged
merged 3 commits into from
Sep 21, 2021
Merged
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
@@ -1,2 +1,3 @@
# Production-only files
README-svn.txt
build
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# wporg-mu-plugins

Over time, this is intended to become the canonical source repository all `mu-plugins` on the WordPress.org network. At the moment, it only includes a few.
Over time, this is intended to become the canonical source repository for all `mu-plugins` on the WordPress.org network. At the moment, it only includes a few.

## Usage

Expand All @@ -16,6 +16,13 @@ Over time, this is intended to become the canonical source repository all `mu-pl
```
1. See individual plugin readmes for specific instructions


## Development

* `npm run start` during development
* `npm run build` before commit/sync/deploy


## Sync/Deploy

The files here are commited to `dotorg.svn` so they can be deployed. The aren't synced to `meta.svn`, since they're already open.
Expand Down
4 changes: 2 additions & 2 deletions mu-plugins/blocks/global-header-footer/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
function register_block_types() {
wp_register_style(
'wporg-global-header-footer',
plugins_url( '/style.css', __FILE__ ),
plugins_url( '/build/style.css', __FILE__ ),
array( 'wp-block-library' ), // Load `block-library` styles first, so that our styles override them.
filemtime( __DIR__ . '/style.css' )
filemtime( __DIR__ . '/build/style.css' )
);

register_block_type(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
* https://github.com/WordPress/wporg-news-2021/issues/13 isn't done yet.
*/


/*
* Common
*/
.wp-block-group.site-header,
.wp-block-group.site-footer,
.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
Expand All @@ -18,23 +14,3 @@
.wp-block-navigation.is-responsive .wp-block-navigation-link__content {
color: var(--wp--preset--color--white);
}


/*
* Header
*/
.wp-block-group.site-header {
padding: 37px 30px 37px 24px;
}


/*
* Footer
*/
.wp-block-group.site-footer {
padding: 69px 80px 61px 80px;
}

.wp-block-group.site-footer .wp-block-social-links .wp-social-link svg {
fill: var(--wp--preset--color--white);
}
7 changes: 7 additions & 0 deletions mu-plugins/blocks/global-header-footer/postcss/footer.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.wp-block-group.site-footer {
padding: 69px 80px 61px 80px;
}

.wp-block-group.site-footer .wp-block-social-links .wp-social-link svg {
fill: var(--wp--preset--color--white);
}
3 changes: 3 additions & 0 deletions mu-plugins/blocks/global-header-footer/postcss/header.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.wp-block-group.site-header {
padding: 37px 30px 37px 24px;
}
3 changes: 3 additions & 0 deletions mu-plugins/blocks/global-header-footer/postcss/style.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import "common.pcss";
@import "header.pcss";
@import "footer.pcss";
Loading