From a9332591d54314031c20f0a8d7a9c2ffae54458b Mon Sep 17 00:00:00 2001 From: Armen Avetisyan Date: Sat, 24 Feb 2018 20:12:34 +0300 Subject: [PATCH] Answer to @media types' question with example (#27) * Answer to @media types' question with example Referred to question: https://github.com/yangshun/front-end-interview-handbook/blob/master/questions/css-questions.md#can-you-give-an-example-of-an-media-property-other-than-screen * Update reference link --- questions/css-questions.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/questions/css-questions.md b/questions/css-questions.md index 18e0f8084..0db3fa009 100644 --- a/questions/css-questions.md +++ b/questions/css-questions.md @@ -225,7 +225,24 @@ No... Sadly. ### Can you give an example of an @media property other than screen? -TODO +Yes, there are four types of @media properties (including _screen_): +* `all` - for all media type devices +* `print` - for printers +* `speech` - for screenreaders that "reads" the page out loud +* `screen` - for computer screens, tablets, smart-phones etc. + +Here is an example of `print` media type's usage: +```css +@media print { + body { + color: black; + } +} +``` + +###### References + +* https://developer.mozilla.org/en-US/docs/Web/CSS/@media#Syntax [[↑] Back to top](#css-questions)