> [T]hey’re as useful to learn coding as it is to use ready-to-heat-up dough and buns to become a baker.
I would imagine getting a familiarity with a new oven would be a good use for a new baker experimenting with ready to bake items.
I get the feeling the author is into a very brutal style of learning that might resonate with some, but probably not most with their steps.
This is from 2018 and updated last in 2019, but the title didn't show that.
If you to want to add a linter you can either add one rule at a time or make it part of your process that the number of warnings goes down with every merge.
For example, setting the box sizing properly in order to ensure consistent widths regardless of borders or padding.
Few devices (usually the slightly older fw locked devices) which can get a reuse on local net will get some reuse benefit if you added polyfills. I am doing this by conditional "polyfills with SSR" with nginx/lua at the moment. (kindle os/etc. is a pretty good catchall proxy for those browsers; since they still show some html, you can get a very reliable static+interactive (page refresh syncs nicely with the latency) use out of them. (actually, just to periodically update the view of some react page, running headless...)
Edit: Well, that's an extreme, but it has happened that latest react code won't work on a newly unwrapped device still awaiting next fw update).
I am thinking about using npm to get access to linting, uglify, etc. but that would be strictly for distribution, not development.
Modern JS is pretty clean and the native DOM methods are actually very pleasant generally. You can get really far without even needing a package manager, but eventually something like npm becomes useful if bulky.
For me, minimal web development means doing as much as I can at the server. This includes tracking client UI state if feasible. The more stuff you have in 1 domain like that the easier it becomes to control complexity.
When your state machine is split between 2 realms is when you get into traps that things like React were created to resolve.
var element = document.querySelector(...)
var elements = document.querySelectorAll(...)
Just include Vue from CDN as a script tag.
And if you want a jump-start with ready-made components and good styling, I can also recommend Buefy - https://buefy.org/documentation - like Vue, it can also be included with a simple script tag, without any command line tools.
Full access to the site / book / codebase costs $100, but the free content alone is worth more than that. Can't recommend it highly enough. Axiomatic CSS, composable layout primitives, and profoundly well-researched and -designed solutions to myriad real-world problems with accessibility and maintainability...
I've been doing web-related stuff for a living since 1998, and have literally never encountered a better resource for getting the hardest part of FE dev right, using standards and building up from first principles.
PS The site's examples implement layouts using HTML and CSS, and the paid version includes a Web Components implementation (trivially translated to React, or integrated / embedded w Vue).
As a backend dev, it's what I wanted frontend work to feel like when I started learning frontend.
If you want to do anything with much state or user interaction, a reactive framework becomes useful. Vue is really quite friendly.
As to how to learn, I've been doing it too long to have a good recommendation. Probably read a JS book, it's a bit of an odd language with a lot of wrinkles.
The guide gets it right in the "practise" part, though: the beauty of the web is that you can write an HTML file and immediately see what you created in the browser. You don't need to read the HTML spec's instructions on Microdata before you do that.
But never opening them is a mistake. The value of taking a look, skimming around, reading a few parts that seem interesting to you, is HUGE compared to never even having looked in there. And then continuing to do so when a curiosity arises.
Besides those principles I find Pug to be indispensable for writing "pythonic" style HTML https://pugjs.org
You can rearrange the structure easily by "moving" lines of code up or down in your editor, you can set it to auto-compile on saving, just awesome.
Edit: specifically front end.
Front end is generally pretty robust these days. Especially with cash grid and flexbox.
You can't get more minimal than Hugo, Jekyll when trying to build a blog. My blog is fully functional and apart from Google Analytics, it doesn't use any JS at all.
> My blog [...] doesn't use any JS at all.
Now suppose there were JS used on some page(s), and that is the static site generator...
Inspectors will do things like display colors as their RGB triples i.e. rgb(x, y, z) in computed styles when a color has been defined in the HTML like in a body tag or table cell's bgcolor attribute.
- "An html element's end tag can be omitted if the html element is not immediately followed by a comment." https://html.spec.whatwg.org/multipage/semantics.html#the-ht...
- "A head element's end tag can be omitted if the head element is not immediately followed by ASCII whitespace or a comment." https://html.spec.whatwg.org/multipage/semantics.html#the-he...
- "A body element's end tag can be omitted if the body element is not immediately followed by a comment." https://html.spec.whatwg.org/multipage/sections.html#the-bod...
Neither of the three tags you've mentioned are required anymore in HTML5.
However, I think it's evidence the author read the specifications as recommended.