The Endless Scare
Post pobrano z: The Endless Scare

flow/er
Post pobrano z: flow/er

The Grotlyn
Post pobrano z: The Grotlyn

Abstract book covers animated by Henning M. Lederer
Post pobrano z: Abstract book covers animated by Henning M. Lederer

Many of us have grown up with these cool abstract book covers that seem to have been trendy in the 60s and 70s, I would even go as far as saying that they have become iconic. Henning M. Lederer, a digital artist based in Düsseldorf Germany, decided it was time to have some fun with it. He took upon himself to animate the covers and give them a new life on the Internet.



Miniature Scenes Staged Inside Jewelry Boxes by Curtis Talwst Santiago
Post pobrano z: Miniature Scenes Staged Inside Jewelry Boxes by Curtis Talwst Santiago

Curtis Talwst Santiago creates tiny worlds that fit inside jewelry boxes. If you are as clumsy as I can be when it comes to handycraft, you can only be in awe in front of this artist’s work.





HTML Templates via JavaScript Template Literals
Post pobrano z: HTML Templates via JavaScript Template Literals
You know those super cool backticks-for-strings in new JavaScript?
let emotion = `happy`;
let sentence = `Chris is feeling ${emotion}`;
Besides the variable interpolation in there being mighty handy, the do multi-line strings wonderfully, making them great for chunks of HTML:
const some_html = `
<div class="module>
<h2>${data.title}</h2>
<p>${data.content}</p>
</div>
`;
That doesn’t look overly different than JSX does it?! Maybe we’d do something like that as a React component:
class MyModule extends React.Component {
render() {
return
<div class="module">
<h2>{this.props.title}</h2>
<p>{this.props.content}</p>
</div>;
}
}
But what if we don’t really need React, or any other fairly-large-ish JavaScript framework?
What if the only thing we want is the ability to render HTML templates and also really efficiently re-render them when we need to, like React is known for?
As far as I understand it, that’s what projects like lit-html are for. As I write, it’s a pretty new library from Google and the Polymer folks.
It allows you to define an HTML template with regular template literals, like this:
import { html, render } from './lit-html.js';
const helloTemplate = (data) => html`
<div class="module">
<h2>Hello ${data.name}!</h2>
<p>${data.content}</p>
</div>
`;
Then you call the render function, passing it that template, the data, and where you want it rendered:
let data = {
name: "Chris",
content: "Just trying to figure stuff out."
}
render(helloTemplate(data), document.body);
Then say the data changes… you call render again:
data.name = "Sammy";
render(helloTemplate(data), document.body);
And this is where lit-html shines. It’s smart enough to only update the parts of the DOM it needs to.
Here’s a little comparison where some data is changed, then the templates re-rendered. If we innerHTML the whole thing, well, the entire DOM is changed. With lit-html it just changes smaller inner parts.
Here’s a little video where you can see the DOM-updating difference:
There is another project along these lines too. I don’t know quite enough to judge, but it’s a bit older and I believe it’s a bit more robust. It’s called HyperHTML.
HyperHTML also allows you to create templates and render them. And most importantly rerender them efficiently.
Here’s a demo where the data comes from the Quotes on Design API and inserted into a template:
See the Pen Trying HyperHTML by Chris Coyier (@chriscoyier) on CodePen.
Kinda cool that these mini-libraries exist that do useful things for us, so when situations arise that we want a feature that a big library has, but don’t want to use the whole big library, we got smaller options.
HTML Templates via JavaScript Template Literals is a post from CSS-Tricks
lite.cnn.io
Post pobrano z: lite.cnn.io
This little website pulls in all the main stories from CNN and strips almost everything from the design; styles, images, fonts, ads, colors. Nada, zilch, gone. At first it looks like nothing but hypertext and it feels like an extraordinary improvement but Sam Saccone made a thread about potential improvements that the team could use to make that experience even faster such as server side rendering and replacing the React framework with something smaller, like Preact.
Either way this approach to news design is refreshing. However, I can’t find anything more about the the motivations for building this version of CNN.com besides the announcement on Twitter. It would certainly be fascinating to learn if CNN built this specifically for people caught in disastrous situations where battery life and load time might be a serious matter of life and death.
Direct Link to Article — Permalink
lite.cnn.io is a post from CSS-Tricks
Compilers are the New Frameworks
Post pobrano z: Compilers are the New Frameworks
Tom Dale:
Increasingly, the bytes that get shipped to browsers will bear less and less resemblance to the source code that web developers write.
Indeed. I suspected the same:
Because performance matters so much and there is so much opportunity to get clever with performance, we’ll see innovation in getting our code bases to production. Tools like webpack (tree shaking, code splitting) are already doing a lot here, but there is plenty of room to let automated tools work magic on how our code ultimately gets shipped to browsers.
Tom also says:
This is a loss in some ways (who else got their web development start with View Source?) but is a huge win for users, particularly in emerging markets.
It seems to me today’s world of GitHub, StackOverflow, and the proliferation of learning resources more than make up for learning via our own website spelunking, not to mention how insightful today’s DevTools are, even if what they are looking at isn’t hand-authored.
Direct Link to Article — Permalink
Compilers are the New Frameworks is a post from CSS-Tricks
Heartbeat agency
Post pobrano z: Heartbeat agency![]()
