297 points · by Space_Lord_ · 7y ago · 139 comments
Smooth scrolling CSS: Not IE, Edge or Safari. https://caniuse.com/#search=scroll-behavior
HSL: Everywhere. https://caniuse.com/#search=hsl
Details element: Not IE, Edge. https://caniuse.com/#search=details
Progress element: Everywhere. https://caniuse.com/#search=progress
Meter element: Not IE. https://caniuse.com/#search=progress
CSS variables: Not IE. https://caniuse.com/#search=css%20variables
Not a deal breaker functionally speaking, but sometimes a subtle transition is useful so as to be less jarring.
This does not work in Firefox, either.
Including accessibility? For that reason alone I think it makes sense to use the most high-level built-in features available.
Most of our devs were pretty thorough about doing the most they could in the given time frames anyway, but it pretty much never was made a priority.
On one side, we have the option that helps guard clients against accessibility issues and any problems that they might (though not necessarily will) engender, and is likely to be more maintainable in the long run. But it would also require fewer billable hours to build. And it's not what the client asked for in the first place, so there's the risk of burning social capital in trying to even suggest it.
Alternatively, you can get paid more money to supply the client with more immediate gratification.
engineers don't get to go around running saying "i was gonna put some basic safety procedures in there, but they just wouldn't pay for it"
you make them pay for it
It's something I don't think anyone gets right.. I think MS Ajax Toolkit came closest imho, but that didn't include a prescriptive time input and too small for tablet/phone input.
Wouldn't be the end of the world if browsers actually exposed all of the relevant styling, but it does help to try and make flexible designs. HTML primitives make it a lot easier to reach accessibility spec.
The date input in particular really is a mess though, every platform does it differently and phones have all sorts of weird widgets attached to it.
Film at 11:00.
Frankly, last time I did web development, I felt tempted to just make the entire page one screen sized canvas and implement my own UI toolkit on it. That's bound to be more reliable (and probably faster) that the current state of affairs.
So yes, you are finally doing UI development like it is 1998.
Congratulations.
Sarcasm aside, want to know what a proper GUI toolkit looks like? Take some time to play around with Qt.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<body>
<p>Here are some things that are built into the HTML and CSS standards that you probably didn't know about.
Or maybe you did. Congratulations.</p>
... (about 25 lines with all the real content)
</body>
</html>
Yes, there's an entire HTML document in the middle of the document. Which is just wrong. Then there's another thousand lines of HTML. And yes, there's Javascript.If you cut out the inner document and put it in a file, you can open it and see the useful content.
It's sad it doesn't get more use. Potwntially this is because CSS frameworks hide all this away and nobody is really learning CSS anymore but I wouldn't really know. I'm not really that exposed to the web front end side of things.
What a lot of developers need to understand is that HTML shouldn't be use for layout. HTML should be use for semantic and information structure.
https://alistapart.com/article/the-story-of-css-grid-from-it...
This is probably the reason. There are still browsers out there that don't support it 100% to the spec.
Of those, only IE11 is relevant, as it's a desktop browser, on wider and taller viewports.
Most of these browsers are mobile browsers on devices with narrow viewports, so even the default `display: block` fallback may be sufficient. If you have margins/paddings/widths etc which only make sense in the CSS Grid version, you can set these properties inside an `@supports` query https://developer.mozilla.org/en-US/docs/Web/CSS/@supports
For IE11, it's a choice of presenting visitors with a slightly worse layout, to match the browser (https://philipnewcomer.net/2014/04/target-internet-explorer-... or, if you use Sass or PostCSS, using mixins that output CSS Grid properties with Flexbox as fallback.
Its bugs are well-documented, and most have workarounds https://github.com/philipwalton/flexbugs. Even inline-block can serve as a fallback, if you can avoid whitespace around tags in the markup (https://css-tricks.com/fighting-the-space-between-inline-blo...)
A reasonable fallback doesn't need to match CSS Grid exactly. The whole point of media queries and responsive web design is that the website won't look exactly the same on all devices; it will look and work as good as it needs to look in that specific device.
This is basic HTML5 literacy. At the end of the day the new HTML5 and CSS features do not fit into out dated work practices and the excuses that go with it. Web content creators and developers should be familiar with all of this stuff and not kidding themselves that the 'sea of divs is the way to go because we do really important projects and need to have polyfills back to IE6'.
Not using the new tags and not using CSS grid is a bit like only eating fast food and no longer knowing how to use a knife and fork. When I look at div soup I know that the team behind the page have not got it yet. None of the div soup HTML is maintainable. It is dated. So any 'wow you can use the details/summary' article comes across to me as 'wow, you have learned to wipe your own nose!' This whole industry needs to get to grips with the lingua franca of the web, focus on document structure, use the stuff that works in evergreen browsers and move away from big up front visual design made into div soup to content driven design. It is that simple and excuses are pathetic.
> I already knew all of these things and this is a bad article.
> - Probably Someone
Here's a screencap of the post's HTML source with no markup, for the time being:
https://i.imgur.com/2CGG48Q.png
Edit: Or use the archive.org link spzb posted.
I'm more and more thinking about a modern pure HTML browser. I sometimes use links -g and it's amazing how fast and clean the experience is. Sites that don't work can go fuck themselves. Modern browsers are no longer _user_ agents, they are webdev agents.
It's basically a modern pure HTML browser. With images even. Well, sometimes. If the site's markup isn't garbage.
That's white, no?
In 2019, caniuse.com says scroll-behavior is not available in Apple Safari or MS IE/Edge:
https://caniuse.com/#search=scroll-behavior
None of my friends with iPhones install Firefox or Chrome on iOS. They all just use the default Safari browser.
Basically, while Safari might not "support" this feature, they already force their version of smooth scrolling on every site inside their browser.
On Safari for iOS or MacOS, you already get smooth scrolling no matter what. So they might not support the spec, but you still get it no matter what.
The only explanation I have for IE/Edge is that it is IE/Edge, and no one really expects much from those browsers anymore regardless. If I had a nickle for everytime someone told me "IE doesnt support that", then I wouldn't need a day job.
Lastly, this isn't a critical site feature in most cases. If an IE user uses your site without smooth scrolling, will it really impact their experience in any way? Probably not. So this is an example when you can safely use this feature, the browsers that support it will offer nice smooth scrolling, and the ones that don't will offer the same experience that those browser users are already used to.
If you go to the website in OP and click the table of contents in Chrome and then Safari, you'll see the difference.
[0] https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-beha...
Crazy how they don't let you use a curve to define your own timing.
Even if they did, those browsers use the safari rendering engine under the hood, so they'd have the same issue.
This is sort of like a web designer writing CSS to redesign my browser tabs while I visit their site. This isn't their job.
Plus, on Mac devices with trackpads, the system OS already adds a smooth scrolling to all actions we do. So when we visit these sites that add smooth scrolling with Javascript it can cause us to go insane. Because scrolling becomes insanely sensitive, with 2-3 inputs trying to control scrolling behavior (the OS, the browser, and now JS). The system is adding its own acceleration and deceleration, and then javascript is sitting on top of that trying to interpret these forces and add their own multiplier on top of those. I have visited sites that have JS implemented smooth scrolling that is so sensitive, that I can't even barely touch the trackpad without scrolling down an entire page length.
So many contrast issues (166 X Very Low Contrast via the WAVE tool) , I can't read this site.
please, give Accessibility a try. https://wave.webaim.org/extension/
Putting white text on a light blue background, apparently
(tr) > td img.emoji { padding-bottom: 1em; }
...would take any table row containing a cell with an image in it, and pad the table row itself a bit more, so as to balance out the image which is slightly larger than the text height.The lack of this feature doesn’t bother me so much when actually developing for the web, but so many web scraping libraries offer CSS-selector accessors as an alternative to/replacement for XPath accessors, and when using these libraries, the need to grab the container element of the thing tagged with something (where the container itself has no distinguishing features other than having such a child) always results in inefficient spaghetti compared to what could potentially be a very simple selector.
Anyone know why we don’t have these? Something to do with the cost of rescans on DOM changes, maybe?
This is a major performance factor, since it means all layout can be done in one pass. If the proposed selector were added. CSS layout would have unbounded complexity.
Just error for me.
I’m curious if you’d be willing to share roughly how many votes it earned you? I wonder how the rest of the community responded to it.
Only it’s not a WordPress site.
Using the hidden checkbox/label css hack to make non-js collapsers is something I'd love to get away from since it can confusing for accessibility.
[0] https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Brow...
Please contact the server administrator, webmaster@256kilobytes.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.