0

I'm trying to use max-inline-size (the new logical properties) inside media query, but it doesn't seem to work.

The idea that in English it will be max-width:1000px; and in Japanese it will max-height:1000px

/*Not Working*/
@media (max-inline-size:1000px){
  .main-content{
    background:Red;
    grid-template-columns:auto;
  }
}

CodePen Example

Elad Shechter
  • 3,885
  • 1
  • 22
  • 22

2 Answers2

1

max-inline-size is not in the Media Features.

Use max-height :The maximum height of the display area, such as a browser window or max-width :The maximum width of the display area, such as a browser window

Example:

@media (max-width:1000px){
  .main-content{
    background:Red;
    grid-template-columns:auto;
  }
}
mdev
  • 349
  • 1
  • 5
1

As mentioned, logical properties are properties, not media features, and therefore cannot be used in a media query. Writing mode is a property of an element on a page, not the browser or media the page is being viewed on. You appear to be looking for an element query, which doesn't exist in CSS.

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356