Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8422691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:31:35+00:00 2026-06-10T03:31:35+00:00

I know its quite easy topic, but I found the syntax provided on w3.com

  • 0

I know its quite easy topic, but I found the syntax provided on w3.com is quite complex. Can anyone decode it? Is it important to understand it?

Syntax here:

media_query_list
 : S* [media_query [ ',' S* media_query ]* ]?
 ;
media_query
 : [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
 | expression [ AND S* expression ]*
 ;
media_type
 : IDENT
 ;
expression
 : '(' S* media_feature S* [ ':' S* expr ]? ')' S*
 ;
media_feature
 : IDENT
 ;

It also specifies some tokens below it. Can anyone please decode them also.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:31:37+00:00Added an answer on June 10, 2026 at 3:31 am

    This is a formal EBNF definition of the syntax. If you’re looking for easy-to-read examples, have a look at chapter 2 of the standard.

    In short, S stands for a space character, IDENT for an identifier (like foobar2), * for zero or more repetitions. Let’s go through it in detail:

    media_query_list
     : S* [media_query [ ',' S* media_query ]* ]?
     ;
    

    means that a media_query_list (that’s the everything that can be in @media ( here )) consists of one or more media_query, separated by comma and optional spacing. For example, these are valid media_query_lists:

    media_query
     media_query,  media_query,   media_query,media_query
    

    The definition of media_query is given later, in

    media_query
     : [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
     | expression [ AND S* expression ]*
    

    The | means there are two forms. Either one of

     media_type
     ONLY media_type
     NOT media_type
    

    (and optional expressions, joined with AND), or just an expression followed by optional multiple other expressions, joined with AND.

    An expression is defined as follows:

    expression
     : '(' S* media_feature S* [ ':' S* expr ]? ')' S*
    

    That means it’s always in parentheses, and consists of either just a media_feature, or a media feature followed by an expr. For example, these are valid expressions:

    (foo)
    (foo: 2px) 
    

    In this definition, media_type and media_feature can be arbitrary identifiers. In practice, they will be identifiers that are recognized by the browsers, like print, screen, max-width etc..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know it's been asked around but I haven't found quite the answer yet
I know about http://www.upcdatabase.com/ , but it's quite incomplete. Where popular mobile apps getting
I have the following code (Yes I know it's quite long winded, but I
I know its impossible for 100% protection, but something high or that works for
I know its possible to receive a dayClick event on Fullcalendar. But I would
i'm learning c++. i know quite well java and python, but i'm getting mad
Im trying to make a quite simple game but its having an error. I
I know it's quite idiomatic, or good style at least, in C to declare
I know its possible to create activities by doing something like the code bellow,
I know its possible to accept a list of objects as a parameter thanks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.