Material UI categorizing iPads with a width of 768px and a height of 1024px as belonging to the small

I am facing a challenge with the layout of my app on different screen sizes. To address this issue, I am utilizing Material UI's breakpoints to control the layout based on the screen size.

According to the documentation, screens categorized as small are those that are 600px and below. However, even after implementing these breakpoints, components on the iPad still appear as if it is a small screen despite its width being 768px.

For instance:

const MyComponent = () => (
    <div>
        <Box display={{ xs: 'none', sm: 'none', md: 'block', lg: 'block' }}>
            Display only on MEDIUM screens and up! Should be displayed on the iPad!
        </Box>
        <Box display={{ md: 'none', lg: 'none' }}>
            Display only on SMALL screens. Should NOT be displayed on the iPad!
        </Box>
    </div>
)

Although these blocks work well in general, there seems to be an issue on the iPad where it displays the smaller block. The theme breakpoint configurations remain set to Material UI's default values.

I am puzzled by this situation. Have I overlooked any specific settings related to tablets? How can I ensure that anything above 600px is considered a medium screen consistently?

Answer №1

When working with Material-UI, it's important to understand how breakpoints are defined:

xs, or extra-small: 0px sm, or small: 600px md, or medium: 960px lg, or large: 1280px xl, or extra-large: 1920px

Each breakpoint extends from its specified value (inclusive) up to the next breakpoint (exclusive).

For instance, a breakpoint of sm includes devices such as the iPad at 768px. Small screens are NOT considered to be under 600px; that falls under xs. Instead, they range from 600px and above (up to, but not including, 960px).

For more details, refer to the documentation available at: https://material-ui.com/customization/breakpoints/

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The image fails to appear

Check out my website at www.wostokhr.pl I am having trouble getting the picture "pics/hero.jpg" to show up in the "div id="hero"" section with a JS parallax function. I have double-checked the HTML and CSS validators and everything seems to be correct. An ...

How to Transform a Navigation Bar into a Carousel

I am creating a website that is designed to be responsive. Currently, I have a horizontal navigation bar which collapses into a drop-down menu when the screen size decreases. When each tag in the menu is clicked, a different image loads into a designated ...

several tables all set to the identical TD width

Using a css sheet, I have formatted two tables. The first table is used for filter/sort selection, while the second table is a scrollable data table. div#scrollTableContainer { width: auto; margin: 20px; /* just for presentation purposes * ...

Expanding the input range slider to fill the entire available space

https://jsfiddle.net/a5gdhmfn/1/ <div> <i>O</i> <input type="range" /> <button/> <div>...</div> </div> Inside a div, there is a range slider along with other fixed-width elements. The issue ...

What is the best way to position the publication date of an article at the bottom of the

I am looking to have the article publishing date (1/9/2016) positioned at the bottom inside the container. Right now, the date appears just below the text, but I want it to be aligned at the bottom of the container. The website in question is watchathletic ...

Creating a Scrolling Element in CSS Without Displaying a Scrollbar

Find the visuals and code on JSbin here. Looking to create a left sidebar that is full height with a fixed position, yet have its content accessible without scrollbars and no need for overflow: scroll. I'm hoping to achieve this in CSS only, without ...

What could be causing the visibility issue with my navigation items in the bootstrap navigation bar?

Currently, I am experiencing a puzzling issue with the navigation bar on my live website. The navigation items seem to flicker for a brief moment and then disappear entirely. This unexpected behavior is certainly causing me some concern. I crafted the us ...

How to apply dynamic styling to a MatHeaderCell using NgStyle?

My goal is to dynamically style a MatHeaderCell instance using the following code: [ngStyle]="styleHeaderCell(c)" Check out my demo here. After examining, I noticed that: styleHeaderCell(c) It receives the column and returns an object, however ...

There seems to be a glitch in the functionality of React Router

After upgrading from react Router v2 to v4, my application was completely broken! I turned to Google for answers and discovered that the latest version of react router has been completely rewritten. I tried following the official documentation to update my ...

Issue with checkboxes preventing submission of form

Currently working on a website project for a company that requires certain steps to be completed for deliveries. Unfortunately, I am facing issues with the submit button, and I apologize as I am still new to this. The code I have pasted is divided into tw ...

What is the best way to customize the appearance of these two images within a div element?

While working on a small website project during my internship, I initially used an inline stylesheet. However, upon my boss's recommendation, I switched to an external stylesheet. Now, I'm trying to figure out how to style the two images within d ...

What is the best way to create an interactive menu icon that includes dropdown options using MUI menu features?

i am looking to create a component similar to this https://i.sstatic.net/fwIB0.png currently, I am utilizing a material UI pop menu in my project below is the JSX code snippet <div className="navMenu" style={{ position: "relative" ...

Steps for designing a stationary footer in HTML and CSS

I have implemented a static footer on my website: HTML <div class="card fixedFooter"> <div class="card-body space-around"> <button type="button" class="buttonFooter" routerLink="/myRouter" > <i class ...

What is the best way to display the Link above my custom component?

How can I ensure that the Link appears above the component I created in Next.js 11 version? I encountered this error message: Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()? ...

How to make Vuetify grid columns wrap and fill the full height

I am facing an issue where the component created using v-card in a grid system does not fill the full height. I tried using d-flex but it did not work as expected. The middle column with a white v-card should occupy the entire column height but it is gett ...

The insertion of a chunk into index.html using webpack in a react project is not working

I am currently working with the following configuration file: var webpack = require("webpack"); var path = require("path"); const HtmlWebpackPlugin = require('html-webpack-plugin'); var DIST_DIR = path.resolve(__dirname,""); var SRC_DIR_APP = p ...

Adding roles in ReactJS: A step-by-step guide

I am looking to enhance the admin's roles upon login to enable the creation of new users. Unfortunately, I am uncertain on how to add these roles and make them functional. Below is the code I have: Login.js class Login extends Component { cons ...

Ionic version 4 ion-img eagerly preloads images instead of implementing lazy-loading

I recently created a horizontal scroller using FlexLayoutModule. It allows me to display a horizontally scrollable list where each item consists of an image and text column. Here's the relevant snippet from my scroller.component.html: <div class=" ...

Add a captivating backdrop to a div element

So I have this unique HTML element that showcases a large headline with two decorative lines on either side, extending to the full width of the element. However, I now have a requirement to display some text as a background behind this element. The issue ...

The tale of the Linechart's Legacy: A journey through google-charts-react

Currently, I'm utilizing a Linechart component from google-chart-react. The issue at hand is my inability to reposition the legend to the bottom; it stubbornly remains on the right side. I have attempted the following adjustments: width={' ...