How to Enable Hamburger Menu for Tablet/Ipad using Shopify | Debut Theme 2020 - media-queries

I've been searching for a way to enable the debut theme Hamburger menu on Ipad or tablet. Everything works with mobile, but I want to be able to see the hamburger menu on tablet and Ipad as well. Hope someone can help me. Thank you!

For Debut 2020 Version
Copy all the code of your Assets -> theme.css.liquid fine and paste it in any Editor (i.e. Sublime)
Find max-width: 749px and replace all the instance with max-width: 768px
Also replace:
min-width: 750px with min-width: 769px
This will work.

To show the hamburger menu on tablet and Ipad,
This solution is for old (2019) Debut Version in which #mixin are used
Find
$grid-breakpoints:
in your Assets -> theme.scss file.
It will look like this:
$grid-breakpoints: (
$small '(max-width: #{$grid-medium - 1})',
$medium '(min-width: #{$grid-medium}) and (max-width: #{$grid-large - 1})',
$medium-down '(max-width: #{$grid-large - 1})',
$medium-up '(min-width: #{$grid-medium})',
$large '(min-width: #{$grid-large}) and (max-width: #{$grid-widescreen - 1})',
$large-down '(max-width: #{$grid-widescreen - 1})',
$large-up '(min-width: #{$grid-large})',
$widescreen '(min-width: #{$grid-widescreen})'
);
And replace it with the following code:
$custom-grid-medium: 769px;
$grid-breakpoints: (
$small '(max-width: #{$custom-grid-medium - 1})',
$medium '(min-width: #{$grid-medium}) and (max-width: #{$grid-large - 1})',
$medium-down '(max-width: #{$grid-large - 1})',
$medium-up '(min-width: #{$grid-medium})',
$large '(min-width: #{$grid-large}) and (max-width: #{$grid-widescreen - 1})',
$large-down '(max-width: #{$grid-widescreen - 1})',
$large-up '(min-width: #{$grid-large})',
$widescreen '(min-width: #{$grid-widescreen})'
);
In this code i replace the first variable "$grid-medium" with new variable called "$custom-grid-medium".
Note: After implementation you need to adjust some areas of your theme according.

Related

calc() CSS problem on Mansory Gallery [ELEMENTOR]

Im working on a mansory gallery from a custom field in an Elementor product page.
I need to display that same images on mobile but 50% bigger so the text on them could be read.
So, as a begginer I inspected the code and come up with this:
#media only screen and (max-width: 1024px){
.e-gallery-image {
padding-bottom: calc(var(--item-height) * 1.5) !important;}
.e-gallery-item {
/*position: abosulte !important;*/
top: calc(var(--percent-height) * 1.5) !important;}
}
But now the images exceed the gallery container downward and I've been days without reaching a solution.
Can anyone help me fix it or has a workarround for what I'm trying to achieve?
Here's the link: https://www.new.sonoffargentina.com/producto/sonoff-dw2-wifi/
Thanks!

Responsive Email - Text breaks up on tablet view

I tested the email on desktop and phone, but this is what one of the receivers saw on their tablet. The fonts and td are in percents, so I'm not sure why it's doing that. Any idea why this would be happening?
The media query I'm currently using is:
#media screen and (max-width: 600px)
I'm thinking that using something like this might fix it:
#media (min-width: 768px) and (max-width: 1024px) {

#media hack not parsed correctly by Stylus

I'm using Stylus CSS preprocessor and I'm trying to output this specific media query, which is a hack for IE8:
#media (min-width 481px), screen\0
however the above compiles to: #media (min-width 481px), screen 0 as the \ is used for escaping: http://learnboost.github.io/stylus/docs/escape.html - escaping the backslash didn't work either screen\\0
I've tried using the unquote() method in various ways without any luck, as it does not compile at all:
> 846| #media (min-width 481px), unquote('screen\0')
847| .social
848| max-width 401px
849| margin 0 auto
expected "(", got "function unquote"
or
> 846| unquote('#media (min-width 481px), screen\0')
847| .social
848| max-width 401px
849| margin 0 auto
expected ")", got "string '#media (min-width 481px), screen\0'"
How can I get Stylus to output that, correctly?
For now you can store the hack in a variable and then use it in the media query like this:
$ie8mediahack = 'screen\0'
#media (min-width 481px), $ie8mediahack
.social
max-width 401px
margin 0 auto
This would also make it self-commented and not look like an actual hack :)

Stylus doesn't compile the #media (min-width) properly

I'm having a problem. I don't know why the Stylus isn't compiling the min-width properly when I'm using the media queries. For example:
#media screen and (min-width: 1400px)
is compiling:
#media screen and (undefined: 1400px)
but when I change from min to max, it works:
#media screen and (max-width: 1400px)
is compiling:
#media screen and (max-width: 1400px)
Anyone can help me?
I'm guess, that you have variable with same name (min-width). If you remove or rename it, all would be fine.

Bootstrap 3 Menu is not collapsing on Ipad

I am doing a project using the new updated Bootstrap 3 RC1.
There are may new features with the new Bootstrap 3 which are much different than the previous versions.
I figured most of the changes but one I can't resolve:
when the menu has many items it breaks in Ipad and other tablets becuase it doesnt get collapsed like it automatically collapsed on mobile (which is good)
I would like to know how do I "force" ipads to act like mobile and show a collapsed menu or better yet - how to collapse the menu if it has many items and on certain screens and smaller it breaks
here are screenshots of my live project:
-- Menu on Big Screens --
-- Menu on Ipad Landscape --
-- Menu on Ipad Portrait --
-- Menu on Mobile --
I simply want the ipad to act like mobile. notice that the portrait does act like mobile as far as the content but not the menu.
Please read: http://bassjobsen.weblogs.fm/twitter-bootstrap-3-breakpoints-and-grid/
The collapsing of your menu is defined in the less files. (Download the latest version from:https://github.com/twbs/bootstrap )
In variables.less you will find #grid-float-breakpoint: #screen-tablet; where #screen-tablet is 768px.
So by default your menu will collapse when the screen width is below the 768px;
The ipad landscape has a screen width of 1024px so the menu will NOT collapse. The ipad portrait screen width is 768 px so the menu will NOT collapse.
See also navbar.less:
// Responsive navbar
// --------------------------------------------------
#media screen and (min-width: #grid-float-breakpoint) {
To change this behavior you have to change the #grid-float-breakpoint b.e set to 767 and recompile your css files.
NB You also mentioned: "notice that the portrait does act like mobile as far as the content but not the menu."
You use "col-lg-" as prefix for your grid rows. "col-lg-" elements will stack below the 992px (ipad portrait) and become horizontal above 992px (ipad landscape).
Just ran into this issue as well. I suggest you visit:
Bootstrap customization
Find the field #grid-float-breakpoint and set it to the screen width after which menu should collapse. There you could use variables from previous section, namely from Media queries breakpoints to set proper points.
Also, take a moment and check through all available variables to change. Creating a well-customized Bootstrap package might save you hours of dev. work, if not more.
For those poor souls who are not using less, you would have to modify the bootstrap.css and change media queries associated with navbar that have a breakpoint of 768px to 992 px.
For example, change
#media (min-width: 768px) {
.nav-tabs.nav-justified > li {
display: table-cell;
width: 1%;
}
.nav-tabs.nav-justified > li > a {
margin-bottom: 0;
}
}
to:
#media (min-width: 992px) {
.nav-tabs.nav-justified > li {
display: table-cell;
width: 1%;
}
.nav-tabs.nav-justified > li > a {
margin-bottom: 0;
}
}
The no less implementations I found didnt work
Couldn't find the styles to make this happen on its own anywhere, ended up finding this - https://coderwall.com/p/wpjw4w
I was able to correct our issue by changing the #media (max-width: 768px) query to 767px instead. One of the links above referenced a 1px issue on iPad which breaks differently and was forcing the mobile version of the website instead.
If anyone is using the standard bootstrap.css file, I had to change it in 3 places:
around line 3780
/*changed from 768 to 992 */
#media (min-width: 992px) {
.navbar-header {
float: left;
}
}
around line 3799
/* changed from 768 to 992 */
#media (min-width: 992px) {
around line 3924
/*changed from 768 to 992 */
#media (min-width: 992px) {
I hope this helps someone :)
I had the opposite problem. On iPad the navbar was not collapsed (as expected), but the styles for a collapsed navbar were applied. I got it solved by changing the media query for the collapsed navbar adding -1 to match with $grid-float-breakpoint as follows:
#media (max-width: $screen-sm-min - 1) {
//styles for collapsed navbar (which won't show up on iPad portrait)
}