111 points · by stablemap · 9y ago · 128 comments
Default behavior is for you to do nothing to your code and Safari on the X will automatically pad around the inset and rounded corners. This is just if you _want_ to take advantage of the whole screen.
I'm fine with learning new, standard techniques for dealing with a broadening range of opportunities, but it's annoying to have to learn and incorporate Apple-only technologies in my web apps. But if the standard platform doesn't have a solution, Apple will solve it themselves.
* https://github.com/w3c/csswg-drafts/issues/1693#issuecomment...
* https://drafts.csswg.org/css-values/#calc-notation
* https://www.w3.org/TR/css-round-display-1/#viewport-fit-desc... (Apple is doing the meta tag version of the @viewport descriptor)
Maybe this is high time for us to get over this thought, Oh Steve wouldn't have done that. In fact, Steve launched the iPod with a scrolling ball.
Steve launched an iPhone with antennagate.
Steve launched Newton.
Steve, with all due respect, had made his share of mistakes too. He's with no doubt a good product visionary, but Tim Cook's objective isn't to be Steve but to be Apple CEO.
It was a click wheel, not a scrolling ball. Even now, the click-wheel would be a good UX: https://en.wikipedia.org/wiki/IPod_click_wheel
Steve launched Newton.
Come on now--Steve was at NeXT when the Newton was released. John Sculley launched the Newton.
Steve launched an iPhone with antennagate.
As Apple and Steve demonstrated, most smartphones at that time did the same thing as the iPhone 4; the only difference was it was Apple and not Nokia or Blackberry. And also because Steve was pretty blunt about his feelings and didn't do the corporate CEO thing any other Fortune 500 CEO would have done--https://www.youtube.com/watch?v=IorfYuF4gMM
I doubt you could predict what Steve would do when he was alive.
a) keeping the macbook air non-retina (for like five years after PC laptops were retina, even after the incremental cost for the feature was very, very close to zero due to industry-wide cost reductions in display/chipset tech)
b) shipping the new macbook pro with the touch bar
c) shipping the new macbook pro with that keyboard that just breaks down when used outside of a cleanroom
d) the whole luxuary/jewelry transition of the company
This Steve Jobs? https://www.cultofmac.com/270831/steve-jobs-luxury-yacht-spo...
I don't know where people get the idea that Jobs was always right. He was a master of changing his entire opinion on a dime (usually for good reasons, to be fair) but still acting as if he'd been right the whole time.
That's not the problem! That's one line of CSS.
The problem is that now we are expected to design for this non-rectangular screen, taking "advantage" of the little gaps at the sides, and perhaps fill them with little buttons in creative ways.
So that's the real problem.
This will cost us (developers) extra time.
Instead, I think Apple would have done a better job if they filled those corners with system icons.
I just added 'viewport-fit=cover' to my project and boy am I tired! ;-)
In the words of Aaron Rogers: relax.
The CSS frameworks (Foundation, Bootstrap, etc.) will have this baked in the next time they're updated.
Compared to the drama we as web developers have dealt with in the past, this is pretty minor. Apple gives you the CSS you need:
@supports(padding: max(0px)) {
.post {
padding-left: max(12px, constant(safe-area-inset-left));
padding-right: max(12px, constant(safe-area-inset-right));
}
}
And if you have a recent Mac, you can test it in Xcode 9's iPhone X simulator.We as developers have plenty of time: the iPhone X can't be preordered until October 27; the first customers won't have them until November 3rd at the earliest: https://www.apple.com/shop/buy-iphone/iphone-x
I think we're going to be okay.
You can read all about it at https://github.com/w3c/csswg-drafts/issues/1693#issuecomment...
I still use the web on an iPhone 5S. Even with cropping bars at the top and bottom of a website, the iPhone X view will be improved over the 5S view and it'll look exactly like a website looks on my 5S today - rectangular website framed by a black bezel with rounded corners.
I think a more sensible default would have been to fill the irregular space with black to create a letterboxed appearance. Basically reduce the irregular space to inactive unless specifically requested by the site's designer.
PS: Does it also extend the "background-image" property?
html {
background-color: black;
}I agree, I would've liked to see a letterboxed solution, similar to what they do for fullscreen video.
> The next step towards making our page usable again after adopting viewport-fit=cover is to selectively apply padding to elements that contain important content, in order to ensure that they are not obscured by the shape of the screen.
This is taking me back to the era of TV on CRT screens. Since there was always a bit of overscan, it was never a guarantee that the content at the very edge would actually end up visible to the end users, so the industry adopted a "safe area" 80-90% in each dimension (5-10% margin on each edge). Camera operators would avoid framing content such that important items are in that zone, and title generators would account for that margin to avoid having part of a text/subtitle cut off.
We've come full circle.
With that said, they lose the plot a bit when the iPhone X's safe area adds unnecessary padding outside of the notch, and then double down on that mistake when they talk about their brand new `min()` and `max()` functions. When you start combining math functions in CSS, you need to back up and ask what you did wrong, because you definitely did something wrong.
What you should do is add some padding for the safe area, which might be 0, and then add some more padding (of your choosing) beyond that. Same way any other screen works. But it's Apple, so it will probably end with everyone forced to make the same stupid mistake and then we'll need a new standard to get rid of it all.
Anyway, grumbles aside, I think Apple deserves kudos here for pushing forward some existing standards in a mostly constructive way.
These functions aren’t Apple’s and they're not new.
There was a proposal a year ago to add them back to CSS, which means they were existed in some W3C or WHATWG specification proposal before that: https://github.com/w3c/csswg-drafts/issues/544
The link in the article will take you to the current specification: https://drafts.csswg.org/css-values/#calc-notation
In brief, it lets you replace the "CSS locks" pattern which is a super awkward way to apply clamping to a flexible size. min()/max() makes it much easier.
I also don’t understand why all browsers are adding css properties just to support the new iPhone, but maybe I don’t understand how this committee works.
There are browsers in refrigerators, e-readers, game consoles, smart TVs, kiosks and who knows what else. There will be lots of devices that can take advantage of these new properties, not just the iPhone X.
"I think I’ve fixed the notch issue in landscape #iphoneX"
The concept of a truly full-screen device is what everyone is waiting for. That's the future. Until the engineering manages to reach that point, Apple should have restrained themselves from releasing this kind of unpolished product. Sometimes, when you can only get to 80% of what you're aiming for, it's better to put the project on the back burner until you can reach the 100%. The iPhone X looks like an unfinished prototype, not the result of professionals who understand that sometimes you need to take a step back.
The issue is where you put the various sensors on the front - even with just a camera you’re still going to have a notch (see the Essential phone) until we can use these sensors behind an OLED screen.
Phone manufacturers are going to be shooting for the bezelless design for the foreseeable future so this issue isn’t something that’s going to be isolated to Apple alone.
The alternative is an asymmetrical bezel, which is “less sexy and cool” than the (mostly) edgeless design. Defaulting to this avoids the problem, but you’re no longer hip.
This is another weird case of being in a transitionary period (wireless headphones is another) of functional design. Until the kinks are worked out, we’re just gonna have to deal with the weirdness because it’s not going away.
I frankly thought it was going to be a bit more of a mess than this so I'm pleasantly surprised.
No Apple, we won't change all our websites for your new gimmick.
That's fine by me.
I think their solution is bad. The inset makes the front of the phone look busy/unclean/techie. It’s lacking elegance. They should have reduced the left and right bezel to nearly zero and added a small bezel at the bottom that matches the one at the top to create symmetry. Basically, just shrunken iPhone 7 bezels on all sides and a rectangular screen.
Edit: If rumors were true and they wanted to put Touch ID below the screen, their goal might have been a phone with the same bezel thickness on all sides. But Touch ID below the screen didn’t work and they had to add sensors to compensate – compromising by creating an inset.
This is a terrible idea - you can’t quickly tell which way the phone goes up. Have you used a Moto G2?
you should also try to be less arrogant when talking about the work of others ;-)
No thanks.
1. The scroll bar is disappearing under the notch when it's on the other side.
2. The chosen example has a solid color background while websites often have complex edge-to-edge ones which look even worse with the insets.
3. The home indicator and the round corners now permanently block some content at the bottom and edges in any orientation.
4. Objects in the vicinity of the prominent round corners will often look inharmonious, poorly clipped, etc.
As the article states, prefixes have created a set of problems, which is why Apple, Google, Mozilla and Microsoft stopped using them for new features.
min() and max()
Haven't been enabled in iOS 11 yet, as the article states.I have no idea whether or not there's a WG resolution because the WG is terrible at tracking resolutions.
Pretty cool that it's so easy to try out! And especially that you don't have to blow $1000 on a real device if you don't want to.
(Sucks if you're not using OS X, of course...)
Out of the box, Safari displays your existing websites beautifully on the edge-to-edge display of the new iPhone X. Content is automatically inset within the display’s safe area so it is not obscured by the rounded corners, or the device’s sensor housing.
Luxurious, hand crafted, precision infuriating, we went all over the world and collected only the best infuriating and merged it seamlessly into your rage.
Few people irritate me (that I haven't met) more than that guy does.
It's irrational but there it is.
https://drafts.csswg.org/css-values/#calc-notation https://github.com/w3c/csswg-drafts/issues/1693#issuecomment...
Thanks Apple for yet another item we have to deal with because your "special". /s