by hawski · 5y ago · 0 comments
<!DOCTYPE html>
<meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1">
<style>
body{
font:menu;font-size:1.125em;
margin:auto;max-width:40em;
padding:0 0.5em 90vh 0.5em;
}
</style>
I don't use html, head and body tags and I don't close tags that don't need to be closed like p. With this html is almost like markdown.I use this bottom padding, because I like to scroll all the way up and it also is useful if you have low anchors for one to see on top what was supposed to be there.
I omitted the title, but it's a part of the content for me. This way I can use the simplest SSG there is: cat.
As a default for otherwise-unstyled content, it's not very user-friendly to override the user's default font and size preferences.
The browser lets me decide how I'd like unstyled text to appear. Unless you're explicitly doing typographic design, please don't arbitrarily override my choice.
I would personally not do this if browsers would have sensible defaults, but IMO they don't. Mostly it is a matter of backward compatibility.
Also I'm using font:menu so theoretically the same as your browser is using. Depending on your browser/OS you can change the font for all, not ideal, but doable. Similar to how every browser has different settings for your preferred fonts. But in Firefox for example you can deselect "Allow pages to choose their own fonts, instead of your selections above" and you're done.
I'm saying all this as a person wanting to implement a modern html-only browser to make all those obnoxious stylesheets go away.
If your issue is that many browsers default to a serif font, and you really dislike that, maybe setting font-family:sans-serif would be better? At least that's intended to be suitable for content, rather than UI.
Excuse my ignorance: what the heck does this achieve?!
https://www.w3schools.com/css/css_rwd_viewport.asp for an example image
https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_m... for more detailed info
[1] https://github.com/Conaclos/origin.html/blob/master/template...
This is a cat and mouse game. iOS 14 doesn't respect user-scalable=no or maximum-scale, unfortunately.
What you need to do is this now, if you don't want the web browser to respond to scaling (and as much as the idiots at Apple love their high horses, there are actual use cases for this, including when you are building a webapp or when you are building a web page with your own pinch zoom logic):
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<style>body { touch-action: pan-x pan-y; }</body>
Basically, Apple tries hard to break HTML5 apps at every new iOS release.When will we ever have HTML5 apps that match native apps? When they actually let HTML5 apps do what native apps do, like multitouch without triggering a default action.
Best change made in Safari in a long time. My eyesight is going and unzoomable websites were a serious accessibility issue.
Just blatantly breaking standards like this is not a good idea seen some real howlers from sprint back when I worked on x.400.
And using GTM instead of hand coding every thing is a win
I don't use GTM or GA or almost any JavaScript whatsoever.
https://html.spec.whatwg.org/#optional-tags
There will also be no issue including GTM/GA or other scripts.