To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

From Wikipedia, the free encyclopedia

Media queries is a feature of CSS 3 allowing content rendering to adapt to different conditions such as screen resolution (e.g. mobile and desktop screen size). It became a W3C recommended standard in June 2012,[1] and is a cornerstone technology of responsive web design (RWD).

YouTube Encyclopedic

  • 1/3
    Views:
    40 318
    15 237
    305 780
  • Responsive Web Design Tutorial #5 - Media Queries
  • Tutorial: Learn how to use CSS Media Queries in less than 5 minutes
  • HTML5 and CSS3 Responsive design with media queries

Transcription

History

Media queries were first sketched in Håkon Wium Lie's initial CSS proposal in 1994,[2] but they did not become part of CSS 1. The HTML4 Recommendation from 1997 shows an example of how media queries could be added in the future.[3] In 2000, W3C started work on media queries and also on another scheme for supporting various devices: CC/PP. The two address the same problem, but CC/PP is server-centric, while media queries are browser-centric.[4] The first public working draft for media queries was published in 2001.[5] Media Queries Level 3, published as a Candidate Recommendation on 27 July 2010, became a W3C Recommendation on 19 June 2012. Proposed corrections were published on 5 April 2022.[6]

Media Queries Level 4, published as a Working Draft on 9 May 2017, were a W3C Candidate Recommendation Draft as of 25 December 2021.[7]

Usage

A media query consists of a media type and one or more expressions, involving media features, which resolve to either true or false. The result of the query is true if the media type specified in the media query matches the type of device the document is being displayed on and all expressions in the media query are true. When a media query is true, the corresponding style sheet or style rules are applied, following the normal cascading rules.[8][9] Media queries use the @media CSS "at-rule".

Examples

The following are examples of CSS media queries:

@media screen and (display-mode: fullscreen) {
  /* Code in here only applies to screens in fullscreen */
}
@media all and (orientation: landscape) {
  /* Code in here only applies in landscape orientation */
}
@media screen and (min-device-width: 500px) {
  /* Code in here only applies to screens equal or greater than 500 pixels wide */
}

Media types

A media type can be declared in the head of an HTML document using the "media" attribute inside of a <link> element. The value of the "media" attribute specifies on what device the linked document will be displayed.[10] Media types can also be declared within XML processing instructions, the @import at-rule, and the @media at-rule. CSS 2 defines the following as media types:[11]

  • all (suitable for all devices)
  • braille
  • embossed
  • handheld
  • print
  • projection
  • screen
  • speech
  • tty
  • TV

The media type "all" can also be used to indicate that a style sheet applies to all media types.[12]

Media features

The following table contains the media features listed in the latest W3C recommendation for media queries, dated 6 June 2007.[13]

Feature Value Min/Max Description
color integer Yes Number of bits per color component
color-index integer Yes Number of entries in the color lookup table
device-aspect-ratio integer/integer Yes Aspect ratio
device-height length Yes Height of the output device
device-width length Yes Width of the output device
grid integer No True for a grid-based device
height length Yes Height of the rendering surface
monochrome integer Yes Number of bits per pixel in a monochrome frame buffer
orientation "portrait" or "landscape" No Orientation of the screen
resolution resolution ("dpi", "dpcm" or "dppx") Yes Resolution
scan "progressive" or "interlaced" No Scanning process of "tv" media types
width length Yes Width of the rendering surface

References

  1. ^ Media Queries Publication History 19 June 2012
  2. ^ Håkon Wium Lie. "Cascading HTML Style Sheets". Retrieved 20 January 2013.
  3. ^ "Basic HTML data types". www.w3.org.
  4. ^ "Re: Feedback on Media Queries CR from Håkon Wium Lie on 2002-07-17 ([email protected] from July 2002)". lists.w3.org.
  5. ^ "Media queries". www.w3.org.
  6. ^ Media Queries Level 3
  7. ^ Media Queries Level 4
  8. ^ "CSS media queries". Mozilla Developer Network and individual contributors. Retrieved 28 April 2017.
  9. ^ "How to create media queries in Responsive Web Design". TechRepublic.
  10. ^ "HTML link tag". W3Schools. Retrieved 28 April 2017.
  11. ^ "Media Queries". World Wide Web Consortium. Retrieved 28 April 2017.
  12. ^ "Media Queries". World Wide Web Consortium. Retrieved 28 April 2017.
  13. ^ "Media Queries". Sitepoint. Retrieved 28 April 2017.

External links

This page was last edited on 25 May 2023, at 05:40
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.