Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
7 changes: 1 addition & 6 deletions .github/UTILITY_CLASSES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ Note: The font size still needs to be changed to x-small if we're recreating a N

# Responsive Elements

`mobile-only` and `desktop-only` can be applied to blocks to display them based on the screen size.

| CLASS NAME | DESCRIPTION |
| ------------ | ------------------------------------------------------------------------------- |
| mobile-only | The block will be displayed on the screen if it is 781px wide or less. |
| desktop-only | The block will be displayed on the screen if the screen is at least 782px wide. |
The Newspack Block Theme uses WordPress's blockVisibility to show/hide certain elements on desktop and mobile, including different versions of the header and footer template parts.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole section is now uncecessary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeaaaah I was totally overthinking that -- removed in 9fa5c14!


# Position

Expand Down
4 changes: 2 additions & 2 deletions parts/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- wp:template-part {"slug":"footer-desktop","theme":"newspack-block-theme","tagName":"div","lock":{"move":true,"remove":true},"className":"footer-desktop desktop-only"} /-->
<!-- wp:template-part {"slug":"footer-desktop","theme":"newspack-block-theme","tagName":"div","lock":{"move":true,"remove":true},"className":"footer-desktop","metadata":{"blockVisibility":{"viewport":{"tablet":false,"mobile":false}}}} /-->

<!-- wp:template-part {"slug":"footer-mobile","theme":"newspack-block-theme","tagName":"div","lock":{"move":true,"remove":true},"className":"footer-mobile mobile-only"} /-->
<!-- wp:template-part {"slug":"footer-mobile","theme":"newspack-block-theme","tagName":"div","lock":{"move":true,"remove":true},"className":"footer-mobile", "metadata":{"blockVisibility":{"viewport":{"desktop":false}}}} /-->
4 changes: 2 additions & 2 deletions parts/header.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- wp:template-part {"slug":"header-desktop","theme":"newspack-block-theme","tagName":"div","lock":{"move":true,"remove":true},"className":"header-desktop desktop-only"} /-->
<!-- wp:template-part {"slug":"header-desktop","theme":"newspack-block-theme","tagName":"div","lock":{"move":true,"remove":true},"metadata":{"blockVisibility":{"viewport":{"tablet":false,"mobile":false}}},"className":"header-desktop"} /-->

<!-- wp:template-part {"slug":"header-mobile","theme":"newspack-block-theme","tagName":"div","lock":{"move":true,"remove":true},"className":"header-mobile mobile-only"} /-->
<!-- wp:template-part {"slug":"header-mobile","theme":"newspack-block-theme","tagName":"div","lock":{"move":true,"remove":true},"metadata":{"blockVisibility":{"viewport":{"desktop":false}}},"className":"header-mobile"} /-->
14 changes: 0 additions & 14 deletions src/scss/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,6 @@ ol {
}
}

// Mobile-only
.mobile-only {
@include sass-utils.media(medium) {
display: none !important;
}
}

// Desktop-only
.desktop-only {
@include sass-utils.media(small-only) {
display: none !important;
}
}

// Icons
[class*="newspack-icon"] {
line-height: 0;
Expand Down
4 changes: 2 additions & 2 deletions src/scss/_theme-description.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Theme URI: https://github.com/automattic/newspack-block-theme
Author: Automattic
Author URI: https://newspack.com
Description: A forward-looking news theme designed and developed to be highly customizable with the WordPress block editor. Brought to you by Newspack: https://newspack.com
Requires at least: 6.2
Tested up to: 6.8
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 8.0
Version: 1.26.0
License: GNU General Public License v2 or later
Expand Down
Loading