这里是 Frontend Focus 的中文翻译项目,每周在 己思 平台首发。
翻译及校对:richshaw2015,Yully Che
Web Vitals is a new Google initiative to provide guidance on quality signals (think first input delay, load speed, etc.) that are key to delivering good user experiences on the web.
来源:Google
A thorough resource detailing everything you need to know about functions in CSS. They can be inserted where you’d place a value, or in some cases, accompanying another value declaration — this is a good look at how to use them.
来源:CSS Tricks
A look at some of the history behind the front-end framwork that started them all: HTML5 Boilerplate, which is now 10 years old.
来源:Rob Larsen
This latest version delivers new features for web platform support, such as Audio Worklets and Intl
improvements, on the JavaScript side. Also a number of improvements to the DevTools have been added. Here’s the list of dev-focused changes.
来源:Chris Mills & Harald Kirschner (Mozilla)
The CSS Working Group has published a First Public Working Draft of CSS Box Model 4. The two major changes are the introduction of the margin-trim property and content related to writing modes.
Firefox for Mobile (Android, really) now supports NoScript, PrivacyBadger, and HTTPS Everywhere extensions.
Need to be compliant with European data protection law? You can’t make access to your site dependant on a visitor agreeing that you can process their data aka a ‘consent cookie’.
Did you know that the `<br>` element should only be used for line breaks that are actually part of content (such as in poems or addresses)?
Working with static sites? We have a JAMstack newsletter that may be of interest.
…such as a new Grid inspector for Chrome, the ‘gap’ property in Chrome Canary, and (amazingly) masonry-style grids in Firefox Nightly.
来源:Michelle Barker
Another one of Ahmad’s great deep dives, this time covering the ::selection
pseudo-element and the user-select property in CSS.
来源:Ahmad Shadeed
Looks like more Web Share API support (Level 2 / file sharing) is landing in WebKit — spotted via this tweet from Jake Archibald.
来源:WebKit Bugzilla
“Accessibility is, for all intents and purposes, duct-taped onto the web. We need to make it a first class citizen in browsers. Until we do, we’ll keep wondering why developers aren’t making accessible websites.”
来源:Kilian Valkhof
“Web Performance is a niche term in a broad market, should we broaden our appeal to reach more people?”
来源:Simon Hearne
This is an extensive and down-to-earth multi-part introductory guide to using Eleventy the popular static site generator.
来源:Tatiana Mac
window.location
指南A breakdown that covers most of the methods and properties available on the DOM’s window.location
object.
来源:samantha ming
Using the ::part()
selector.
来源:Ollie Williams
<input type="radio" id="r1" name="aligned" value="left" checked>
<label for="r1">
<svg xmlns="http://www.w3.org/2000/svg"
fill="#ffffff" height="3em" width="3em"
viewBox="0 0 100 100" x="0px" y="0px"
aria-labelledby="title-r1" role="img">
<title id="title-r1">Aligned Left</title>
<rect x="17.04" y="25.36" width="65.91" height="6"></rect>
<rect x="17.04" y="39.79" width="43.87" height="6"></rect>
<rect x="17.04" y="54.21" width="65.91" height="6"></rect>
<rect x="17.04" y="68.64" width="43.87" height="6"></rect>
</svg>
</label>
来源:Christian Heilmann
来源:Elad Shechter
Different from capturing a webpage using Puppeteer or a similar tool in that the screenshot taking happens entirely client side.
来源:Gripeless
Got some internationalization work to do? I18n Ally gives you inline annotations, automated translations via Google Translate (which you can review), progress indication, etc. Supports React, Angular, Vue and other frameworks.
来源:Anthony Fu
This extension measures three core web vitals metrics (Largest contentful paint, cumulative layout shift, and first input delay) in a way that matches how they’re measured by Chrome and reported to other Google tools (see top feature in this issue).
来源:Google Chrome
Useful when old content contains characters like “— in place of a single quote, and similar legacy text issues.
import { hex, htx, txt } from 'utfu'
const dirty = 'On a certain level, it�s like shouting �fire� in a crowded theater.'
const cleanHex = hex(dirty)
// --> 'On a certain level, it\u2019s like shouting \u201Cfire\u201D in a crowded theater.'
const cleanHTML = htx(dirty)
// --> 'On a certain level, it’s like shouting “fire” in a crowded theater.'
const cleanTxt = txt(dirty)
// --> 'On a certain level, it’s like shouting “fire” in a crowded theater.'
来源:Daniel Sieradski
This paid tool converts dynamic websites (e.g. WordPress, Ghost, Joomla, etc.) into static sites, and keeps content in sync.
来源:Miguel Piedrafita
译者注:如需了解,请查看原文。
译者注:如需了解,请查看原文。
Copyright © 2015-2022 BY-NC-ND 4.0