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

CSS - Media queries o tamanho não importa

CSS - Media queries o tamanho não importa

Andres Galante

May 06, 2019
Tweet

More Decks by Andres Galante

Other Decks in Technology

Transcript

  1. “A Web é o ambiente mais hostil que se pode

    imaginar para se fazer suposições” Eric A. Meyer
  2. -Eric Meyer “The Web is the most hostile environment to

    developer assumptions imaginable.” Dispositivos
  3. “As suposições são enganosas. Se pudéssemos concordar apenas com certos

    limites, não seria muito mais fácil controlar o web design?” Jeremy Keith, Resilient Web Design
  4. Responsive design é adaptar nosso projeto a um navegador desconhecido,

    sem assumir onde ele será exibido. Thanks Eric Bailey for this slide
  5. Inclusive design é adaptar nosso projeto a um usuário desconhecido,

    sem assumir quem o usará. Thanks Eric Bailey for this slide too
  6. Screen Dimensions Media Features
 Display Quality Media Features
 Color Media

    Features
 Interaction Media Features Scripting Media Features 1 2 3 4 5
  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.* * Na verdade, não acho que seja possível não

    usar as Consultas de mídia, elas nos ajudam a criar interfaces mais flexíveis e acessíveis. Mas como eu vou explicar para você daqui a pouco, é importante manter nosso código limpo para mantê-lo. Por isso, proponho usar as consultas de mídia como uma ferramenta para parar de assumir.
  24. “Quanto mais complexas forem as nossas interfaces, mais temos que

    pensar para mantê-las adequadamente” Brad Frost
  25. Universal design é o design de produtos que podem ser

    usados por todas as pessoas, na maior medida do possível, sem a necessidade de adaptação ou design especializado. https://abookapart.com/products/accessibility-for-everyone