media-queries

change viewport in media query

北城以北 提交于 2020-07-18 18:14:36
问题 I'm currently working on a responsive webdesign. The "smartphone view" is not yet ready because my client has to obtain some more budget. Therefore I need to implement a temporary view which I want to realize with an fixed viewport that only gets activated on smartphones. I set the viewport using on this way: <meta name="viewport" content="width=device-width, initial-scale=1.0"> I want to change the device-width to 700 pixels if the following media query gets triggered: @media only screen and

change viewport in media query

≡放荡痞女 提交于 2020-07-18 18:11:56
问题 I'm currently working on a responsive webdesign. The "smartphone view" is not yet ready because my client has to obtain some more budget. Therefore I need to implement a temporary view which I want to realize with an fixed viewport that only gets activated on smartphones. I set the viewport using on this way: <meta name="viewport" content="width=device-width, initial-scale=1.0"> I want to change the device-width to 700 pixels if the following media query gets triggered: @media only screen and

How is the screen size measured for media queries?

删除回忆录丶 提交于 2020-07-16 05:57:53
问题 I'm building a responsive website. There's a separate set of CSS to apply for smartphones. To do this, I use the following code @media all and (min-width: 760px) { .wrap { /*css for large screens goes here*/ } } @media not all and (min-width: 760px) { .wrap { /*css for small screens goes here*/ } } My smartphone has a "Screen Resolution: 1080 x 1920." but it still displays the CSS for small screens. I'm surprised this is happening because 1080 > 760 so shouldn't the first block apply? Is

How to Reset CSS after Media Query?

☆樱花仙子☆ 提交于 2020-07-10 06:00:47
问题 I have some elements on my page that display and some that hide via a media query, and ultimately the nav disappears and is replaced by a responsive jQuery menu. This all works great, but when I resize the browser after, some of the elements that where once hidden are not not. This is what I have for the media query @media only screen and (max-width: 1282px) { #wrapMiddleNew { display:block; } } I essintially want to hide it again on the same breakpoint sizing back up. This doesn't seem to

Issue with embedded SVG images in dark mode

夙愿已清 提交于 2020-07-09 11:55:25
问题 Embedded svg image inside tag doesn't work with media query prefers-color-scheme and CSS variables (Chrome and Safari, Firefox works). <?xml version="1.0" encoding="utf-8"?> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="var(--color)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"> <style> :root{--color:#ffffff;} @media(prefers-color-scheme:light){:root{--color:

Issue with embedded SVG images in dark mode

☆樱花仙子☆ 提交于 2020-07-09 11:55:04
问题 Embedded svg image inside tag doesn't work with media query prefers-color-scheme and CSS variables (Chrome and Safari, Firefox works). <?xml version="1.0" encoding="utf-8"?> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="var(--color)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"> <style> :root{--color:#ffffff;} @media(prefers-color-scheme:light){:root{--color:

Safari doesn't calculate rem units correct when scaling with @media (width/height/background-size)

我怕爱的太早我们不能终老 提交于 2020-06-24 22:46:54
问题 When using rem as units in css, scaling doesn't really work in Safari (both PC and Mac). Example located at http://jsfiddle.net/L25Pz/3/ Markup: <div> <img src="http://www.google.com/images/srpr/logo3w.png" /> <p>Lorem ipsum dolor sit amet</p> </div> ​ CSS: html { font-size:62.5% } div { background:url(http://www.google.com/images/srpr/logo3w.png); background-size:275px 95px; background-size:27.5rem 9.5rem; background-repeat:no-repeat; } img { width:27.5rem; height:9.5rem; } p { font-size

ReactJS: Material ui breakpoints

泪湿孤枕 提交于 2020-05-25 01:07:21
问题 What is the difference between breakpoints.up , breakpoints.down , breakpoints.between and breakpoints.value ? And what is meant by this code, how breakpoints value is working here? Is theme.spacing.unit*2*2 = theme.spacing.unit*4 or it has some other meaning? [theme.breakpoints.up(600 + theme.spacing.unit * 2 * 2)]: { width: 600, marginLeft: 'auto', marginRight: 'auto', }, 回答1: Material uses the following set of breakpoints. You can customize the values of this breakpoint in the theme.