Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Media Queries - CSS Conf Argentina

Andres Galante
July 14, 2018
430

Media Queries - CSS Conf Argentina

Andres Galante

July 14, 2018
Tweet

Transcript

  1. -Eric Meyer “The Web is the most hostile environment to

    developer assumptions imaginable.” Dispositivos
  2. “Las suposiciones son engañosas. Si solo pudiéramos ponernos de acuerdo

    sobre ciertos límites, ¿no sería mucho más fácil controlar el diseño web?” Jeremy Keith, Resilient Web Design
  3. Responsive design es adaptar nuestro diseño a un browser desconocido,

    sin asumir dónde va a ser mostrado. Thanks Eric Bailey for this slide
  4. Inclusive design es adaptar nuestro diseño a un usuario desconocido,

    sin asumir quién lo va a usar. Thanks Eric Bailey for this slide too
  5. Screen Dimensions Media Features
 Display Quality Media Features
 Color Media

    Features
 Interaction Media Features Scripting Media Features 1 2 3 4 5
  6. Cuando la ventana del browser de un dispositivo sea como

    mínimo 30ems, hacé lo siguiente…
  7. width height aspect-ratio orientation resolution scan grid update overflow-block overflow-inline

    color color-index monochrome color-gamut hover any-hover pointer any-pointer Media Queries Level 4 Media Features
  8. width height aspect-ratio orientation resolution scan grid update overflow-block overflow-inline

    color color-index monochrome color-gamut hover any-hover pointer any-pointer Media Queries Level 4 Media Features
  9. width height aspect-ratio orientation resolution scan grid update overflow-block overflow-inline

    color color-index monochrome color-gamut hover any-hover pointer any-pointer Media Queries Level 4 Media Features
  10. Orientation landscape portrait The orientation media feature is portrait when

    the value of the height media feature is greater than or equal to the value of the width media feature. Otherwise orientation is landscape
  11. Hover none hover Indicates that the primary pointing device can’t

    hover, or that there is no pointing device. Pointing devices that can hover, but for which doing so is inconvenient and not part of the normal way they are used, also match this value. Indicates that the primary pointing device can easily hover over parts of the page.
  12. Pointer none coarse fine The primary input mechanism of the

    device does not include a pointing device. The primary input mechanism of the device includes a pointing device of limited accuracy. The primary input mechanism of the device includes an accurate pointing device
  13. width height aspect-ratio orientation resolution scan grid update overflow-block overflow-inline

    color color-index monochrome color-gamut hover any-hover pointer any-pointer Media Queries Level 4 Media Features
  14. Reduce motion no-preference reduce Indicates that the user has made

    no preference known to the system. This keyword value evaluates as false in the boolean context. Indicates that user has notified the system that they prefer an interface that minimizes the amount of movement or animation, preferably to the point where all non-essential movement is removed.
  15. Hight contrast Indicates that the subsequent styling rules will be

    applied when the system is placed in high contrast mode with any color variation. Indicates that the subsequent styling rules will be applied when the system is placed in high contrast mode with a black-on-white color variation. Indicates that the subsequent styling rules will be applied when the system is placed in high contrast mode with a white-on-black color variation. active black-on-white white-on-black
  16. Light level dim normal washed The device is used in

    a dim environment, where excessive contrast and brightness would be distracting or uncomfortable to the reader. For example: night time, or a dimly illuminated indoor environment. The device is used in a environment with a light level in the ideal range for the screen, and which does not necessitate any particular adjustment. The device is used in an exceptionally bright environment, causing the screen to be washed out and difficult to read. For example: bright daylight.
  17. .componente This is a an example of a title Here

    goes some body text that the component might have 360px
  18. .componente 300px 600px This is a an example of a

    title Here goes some body text that the component might have 900px
  19. 300px 600px This is a an exampl e of a

    title Here goes some body text that the 900px This is a an exampl e of a title Here goes some body text that the .componente .componente
  20. 300px 600px 900px .componente This is a an example of

    a title Here goes some body text that the .componente This is a an example of a title Here goes some body text that the component might have
  21. 300px 600px 900px .componente This is a an example of

    a title Here goes some body text that the .componente This is a an example of a title Here goes some body text that the
  22. No.

  23. No.* * En realidad no creo que sea posible no

    usar Media Queries, nos ayudan a crear interfaces mas flexibles y accesibles. Pero como les voy a explicar en un rato, es importante mantener nuestro código limpio para poder mantenerlo. Así que les propongo usar media queries como una herramienta para dejar de asumir.
  24. Universal design es el diseño de productos que puedan ser

    utilizados por todas las personas, en la mayor medida posible, sin la necesidad de adaptación o diseño especializado. https://abookapart.com/products/accessibility-for-everyone