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

fix: corrected variable name that causes empty media queries #3243

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

Arukuen
Copy link
Contributor

@Arukuen Arukuen commented Jul 13, 2024

fixes #3214

@Arukuen Arukuen marked this pull request as draft July 13, 2024 05:16
Copy link

github-actions bot commented Jul 13, 2024

🤖 Pull request artifacts

file commit
pr3243-stackable-3243-merge.zip 0cdff31

github-actions bot added a commit that referenced this pull request Jul 13, 2024
@andeng1106
Copy link

@Arukuen Media Query is still not working on my end. Is there any steps I need to take to see the fix? 🤔

Screen.Recording.2024-07-15.at.9.17.38.AM.mov

@Arukuen
Copy link
Contributor Author

Arukuen commented Jul 15, 2024

For the Media Query, we should use @media screen and (max-width: 1024px) instead of @media screen (max-width: 1024px), since CSS syntax require the and keyword.

@andeng1106
Copy link

For the Media Query, we should use @media screen and (max-width: 1024px) instead of @media screen (max-width: 1024px), since CSS syntax require the and keyword.

This is now working 😄

@Arukuen Arukuen marked this pull request as ready for review July 15, 2024 08:04
github-actions bot added a commit that referenced this pull request Jul 15, 2024
@@ -32,6 +32,9 @@ function __construct() {
add_action( 'rest_api_init', array( $this, 'register_settings' ) );

if ( is_frontend() && $this->has_custom_breakpoints() ) {
// Add a filter for replacing shortcut media queries before the breakpoint adjustment.
add_filter( 'stackable_frontend_css', array( $this, 'replace_shortcut_media_queries' ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

Filters need to be assigned.

e.g.

$new_value = add_filter( 'filter_name', 'old_value' );

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bfintal Isn't this for apply_filter function? My goal here is to add a filter that replace the shortcut media queries before the breakpoint adjustment.

github-actions bot added a commit that referenced this pull request Jul 17, 2024
@andeng1106
Copy link

@Arukuen Fix for shortcut media query is not yet working on my end. Is there something I need to do to make it work? 🤔

Screen.Recording.2024-07-17.at.7.mp4

@Arukuen
Copy link
Contributor Author

Arukuen commented Jul 17, 2024

@andeng1106 Have you tried also adding the fix from Premium?

@andeng1106
Copy link

andeng1106 commented Jul 17, 2024

@andeng1106 Have you tried also adding the fix from Premium?

@Arukuen Apologies for adding the comment here this PR. Yes, I'm using PR #354 in the video.

What I did so far:

  • Edited existing block's custom css and saved page
  • Added a new Heading block and used the @media tablet and @media mobile

@Arukuen
Copy link
Contributor Author

Arukuen commented Jul 17, 2024

@andeng1106 The implementation for the editor comes from the premium PR, while the one for the frontend is from this PR. Based on the video, it seems like it is only working on the editor, and I think it's because the PR are tested separately.

If that's the case, here is a build that contains code for both PR.
stackable.zip

@andeng1106
Copy link

@Arukuen The build you provided shows the fix now. Thanks!

@bfintal bfintal merged commit ee7dc9c into develop Jul 22, 2024
1 of 6 checks passed
@bfintal bfintal deleted the fix/3214-media-query branch July 22, 2024 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom CSS - media queries not working properly
3 participants