惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
The GitHub Blog
The GitHub Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Recorded Future
Recorded Future
Y
Y Combinator Blog
Cloudbric
Cloudbric
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Schneier on Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
Cybersecurity and Infrastructure Security Agency CISA
TaoSecurity Blog
TaoSecurity Blog
Security Latest
Security Latest
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
D
DataBreaches.Net
Security Archives - TechRepublic
Security Archives - TechRepublic
H
Hacker News: Front Page
C
Cisco Blogs
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
Recent Commits to openclaw:main
Recent Commits to openclaw:main
V
Vulnerabilities – Threatpost
L
LINUX DO - 最新话题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Google Online Security Blog
Google Online Security Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
A
About on SuperTechFans
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Jina AI
Jina AI
C
CXSECURITY Database RSS Feed - CXSecurity.com
Schneier on Security
Schneier on Security
T
Tenable Blog
N
News and Events Feed by Topic
W
WeLiveSecurity
有赞技术团队
有赞技术团队
AI
AI
爱范儿
爱范儿
大猫的无限游戏
大猫的无限游戏
Latest news
Latest news
T
The Blog of Author Tim Ferriss
S
Security Affairs
Know Your Adversary
Know Your Adversary
Simon Willison's Weblog
Simon Willison's Weblog
G
GRAHAM CLULEY
Google DeepMind News
Google DeepMind News
The Cloudflare Blog

oida.dev | TypeScript, Rust

TypeScript's `erasableSyntaxOnly` Flag Unsafe for work Tokio: Macros Tokio: Channels Tokio: Getting Started Network Applications on the Tokio Stack Remake, Remodel, Reduce. The `never` type and error handling in TypeScript 5 Inconvenient Truths about TypeScript Refactoring in Rust: Introducing Traits Refactoring in Rust: Abstraction with the Newtype Pattern Announcing the TypeScript Cookbook TypeScript: Iterating over objects The road to universal JavaScript 10 years of oida.dev Rust: Tiny little traits The TypeScript converging point How not to learn TypeScript Getting started with Rust Introducing Slides and Coverage TypeScript: The humble function overload TypeScript + React: Children types are broken TypeScript: In defense of any Rust: Enums to wrap multiple errors Dissecting Deno Error handling in Rust TypeScript: Unexpected intersections Upgrading Node.js dependencies after a yarn audit TypeScript: Array.includes on narrow types TypeScript + React: Typing Generic forwardRefs shared, util, core: Schroedinger's module names Learning Rust and Go TypeScript: Narrow types in catch clauses TypeScript: Low maintenance types Tidy TypeScript: Name your generics Tidy TypeScript: Avoid traditional OOP patterns Tidy TypeScript: Prefer type aliases over interfaces Tidy TypeScript: Prefer union types over enums My new book: TypeScript in 50 Lessons Go Preact! ❤️ this in JavaScript and TypeScript TypeScript and ECMAScript Modules TypeScript + React: Why I don't use React.FC TypeScript + React: Component patterns TypeScript: Augmenting global and lib.dom.d.ts Vite with Preact and TypeScript TypeScript: Union to intersection type 11ty: Generate Twitter cards automatically Are large node module dependencies an issue? TypeScript: Variadic Tuple Types Preview TypeScript: Improving Object.keys Remake, Remodel. Part 4. TypeScript + React: Typing custom hooks with tuple types TypeScript: Assertion signatures and Object.defineProperty TypeScript: Check for object properties and narrow down type Boolean in JavaScript and TypeScript void in JavaScript and TypeScript Symbols in JavaScript and TypeScript Why I use TypeScript TypeScript + React: Extending JSX Elements TypeScript: Validate mapped types and const context TypeScript: Match the exact object shape TypeScript: The constructor interface pattern Streaming your Meetup - Part 4: Directing and Streaming with OBS Streaming your Meetup - Part 3: Speaker audio Streaming your Meetup - Part 2: Speaker video Streaming your Meetup - Part 1: Basics and Projector TypeScript and React Guide: Added a new styles chapter TypeScript and React Guide: Added a new render props chapter TypeScript and React: Styles and CSS TypeScript and React TypeScript and React Guide: Added a new prop types chapter TypeScript without TypeScript -- JSDoc superpowers TypeScript: Mapped types for type maps JAMStack vs serverless web apps The Unsung Benefits of JAMStack Sites TypeScript: Ambient modules for Webpack loaders My most favourite talks in 2018 TypeScript and React Guide: Added a new context chapter TypeScript: Built-in generic types TypeScript: Type predicates JSX is syntactic sugar TypeScript and React Guide: Added a new hooks chapter Getting your CfP application right FAQ on our Angular Connect Talk: Automating UI development TypeScript and Substitutability Debugging Node.js apps in TypeScript with Visual Studio Code From Medium: Deconfusing Pre- and Post-processing From Medium: PostCSS misconceptions Saving and scraping a website with Puppeteer Cutting the mustard - 2018 edition Wordpress as CMS for your JAMStack sites My most favourite podcast episodes in 2017 My most favourite talks in 2017 My most favourite books in 2017 The Best Request Is No Request, Revisited Not so hidden figures - Organizing ScriptConf My podcast journey to ScriptCast Grid layout, grid layout everywhere! #scriptconf and #devone
noPrefixes flag in Modernizr
2014-02-20 · via oida.dev | TypeScript, Rust

More than half a year ago I had some little rant on why we should drop using vendor prefixes as a whole. Main points were:

  • Major browser vendors (Google, Mozilla, Microsoft) follow the policy of just shipping unprefixed features in their browsers’ stable releases. So unprefixed became kind of a synonym for a stable feature. Prefixed features are in developer releases and just meant to fool play around and get a preview of things to come. See the Blink developer FAQ and Mozilla Statement in W3C lists for more details.
  • Current versions of major browsers already support plenty of CSS3 and HTML5 features unprefixed, as pointed out in my previous article. Take the transition property, for instance.
  • Older browsers, especially older mobile browsers, support modern features just prefixed, but in most cases they run crappy and have either huge performance issues, other implementation quirks or follow deprecated specifications. We should treat those browsers like old IEs and just give a presentation that they really can handle.

Also, several people already pointed out that vendor prefixes were a necessary evil, but are all in all bad and shouldn’t be used at all; neither by developers nor by browser vendors. There’s even a “considered harmful” article out there, which just shows that there are some really strong feelings out there!

One (solvable) problem #

Well, we kept them using anyways. Mostly because we were used to it, and there were tools (Sass mixins, Emmet.io autocompletion), which helped creating more code than necessary.

Another reason was because we love using Modernizr and the great ability to do feature based decision making: If feature A exists, use that code, otherwise do it in a different way. Modernizr tests do also check for prefixed features. So, for your switch to work in all cases, prefixes were again mandatory.

Modernizr is an indispensable tool for my daily workflow and helps me progressively enhancing my websites and applications.

We had some discussion over at Modernizr and decided to try if a robust and easy to opt-in possibility exists for that very case. And now, with the upcoming release, there’s a flag for that.

noPrefixes #

It’s pretty easy to set up for you. I hope to have it on the Modernizr web page in the near future, but for now you just clone or fork or download the repo, and add one line of code in the file config-all.json. Try to figure out which one!

"options": [
"setClasses",
"addTest",
"html5printshiv",
"load",
"testProp",
"fnBind",
"noPrefixes"
],

config-all.json includes all options for the Modernizr build. Here you can remove the HTML5 Shiv, the possibility to add new (custom) tests, or remove tests which you have no use for. Afterwards, you just build your file using Grunt. Et voilà!

One alternative against code bloat #

If you still want to use vendor prefixes in your CSS file, be sure to check out Autoprefixer. It uses the Caniuse.com database to make sure that your property is just prefixed with the necessary ones.

Modernizr team, I love you guys! #

Big thanks to Patrick Kettner from the Modernizr team who guided me through all this! Learned a lot from you guys.

Related Articles