Apply CSS based on your browser's text rendering engine

Related tags

CSS trmix
Overview

Type Rendering Mix

Bower version devDependency Status

Type Rendering Mix website

Type Rendering Mix detects your browser’s text rasterizer and antialiasing method by parsing the user agent string. It will then add two classes to your HTML element. One class will describe the text rasterizer and the other the antialiasing method it is using:

">

The text rasterizer class name can take the following values:

  • tr-coretext for OS X and iOS;
  • tr-gdi for Windows XP and Windows Vista SP1;
  • tr-directwrite for Windows Vista SP2 and above;
  • tr-freetype for Android and Linux.

The antialiasing method class name will be one of the following:

  • tr-aa-none when no antialiasing is applied;
  • tr-aa-grayscale when grayscale antialiasing is applied;
  • tr-aa-subpixel when subpixel antialiasing is applied.

If Type Rendering Mix can’t determine the antialiasing method with absolute certainty it will attempt to guess. In this case unknown will be added to the class name:

  • tr-aa-unknown-none when no antialiasing is guessed;
  • tr-aa-unknown-grayscale when grayscale antialiasing is guessed;
  • tr-aa-unknown-subpixel when subpixel antialiasing is guessed.

When it is impossible to determine or guess the text rasterizer and antialiasing method tr-unknown and tr-aa-unknown will be used to indicate an unknown text rasterizer and antialiasing method.

Usage

Download the latest version at http://www.typerendering.com and include it in your page:

">

If you are using Bower you can install Type Rendering Mix using:

bower install trmix

Copyright and License

This library is licensed under the two-clause BSD license. Copyright 2013-2014 Tim Brown, Bram Stein. All rights reserved.

You might also like...

CSS Boilerplate / Starter Kit: Collection of best-practice CSS selectors

Natural Selection Natural Selection is a CSS framework without any styling at all. It is just a collection of selectors that can be used to define glo

Dec 8, 2022

Source code for Chrome/Edge/Firefox/Opera extension Magic CSS (Live editor for CSS, Less & Sass)

Live editor for CSS, Less & Sass (Magic CSS) Extension Live editor for CSS, Less & Sass (Magic CSS) for Google Chrome, Microsoft Edge, Mozilla Firefox

Dec 13, 2022

Easily create css variables without the need for a css file!

Tailwind CSS Variables This plugin allows you to configure CSS variables in the tailwind.config.js Similar to the tailwindcss configurations you are u

Dec 22, 2022

Cooltipz.css - A highly customisable, minimal, pure CSS tooltip library

Cooltipz.css - A highly customisable, minimal, pure CSS tooltip library

Cooltipz.css - Cool tooltips Cool customisable tooltips made from pure CSS Lightweight • Accessible • Customisable • Simple Cooltipz.css is a pure CSS

Dec 24, 2022

micro-library for CSS Flexbox and CSS Grid

SpeedGrid micro-library for CSS Flexbox and CSS Grid Overview SpeedGrid dynamically generates inline CSS by specifying the class name. Easy maintenanc

Mar 26, 2022

Data-tip.css - Wow, such tooltip, with pure css!

Notice: hint.css has been much better since I complained about it months ago, so try out its new features instead of this one! data-tip.css Wow, such

May 26, 2021

Tiny CSS framework with almost no classes and some pure CSS effects

Tiny CSS framework with almost no classes and some pure CSS effects

no.css INTERACTIVE DEMO I am tired of adding classes to style my HTML. I just want to include a .css file and I expect it to style the HTML for me. no

Dec 10, 2022

Modern CSS framework based on Flexbox

Modern CSS framework based on Flexbox

Bulma Bulma is a modern CSS framework based on Flexbox. Quick install Bulma is constantly in development! Try it out now: NPM npm install bulma or Yar

Dec 31, 2022

Materialize, a CSS Framework based on Material Design

MaterializeCSS Materialize, a CSS Framework based on material design. -- Browse the docs -- Table of Contents Quickstart Documentation Supported Brows

Jan 2, 2023
Comments
  • Minified and unminified files

    Minified and unminified files

    It might be useful to include an unminified version of trmix in the dist folder, and rename the actual file to trmix.min.js.

    Not only because it's easier for people to read the code and learn how it's done, but also because it's standard practice in frontend JS libraries. That would also let people concat all the libraries in their projects, and then run minification and the very end.

    It seems that grunt-closure-compiler minifies by default, and I've been through its options and couldn't find an option to avoid that.

    opened by paulozoom 2
  • Add Bower support and Grunt task to create 'dist/trmix.js'

    Add Bower support and Grunt task to create 'dist/trmix.js'

    This builds on top of https://github.com/bramstein/trmix/pull/1 with additional grunt task.

    Created as a separate pull request because it's such a small task that it may be unnecessary to automate with Grunt.

    opened by paulozoom 0
Text-based user interface CSS library

TuiCss Text-based user interface CSS library -- Documentation -- About TuiCss is a library focused to create web applications using an interface based

Vinicius Reif Biavatti 1.2k Jan 2, 2023
Serverless Pre-Rendering Landing Page

Serverless Pre-Rendering Demo Read the blog post Checkout the demo Developing By default, the content on the site is based off our public Notion page.

Vercel 389 Dec 21, 2022
CSS animations engine

Animatic With Animatic it's easy to animate over a hundred objects at a time. Each item can have it's mass and viscosity to emulate realistic objects!

Yehor Lvivski 1.4k Nov 20, 2022
Tiny, composable atomic CSS engine

mapcss Tiny, composable atomic CSS engine ?? This project is currently in beta release. All interfaces are subject to change. What mapcss is an Atomic

Satoshi 11 Dec 21, 2022
Reseter.css - A Futuristic CSS Reset / CSS Normalizer

Reseter.css A CSS Reset/Normalizer Reseter.css is an awesome CSS reset for a website. It is a great tool for any web designer. Reseter.css resets all

Krish Dev DB 1.1k Jan 2, 2023
🐒 Normalize browsers' default style

My open source work is supported by the community Special thanks to: Differences from normalize.css Smaller Includes only normalizations for the lates

Sindre Sorhus 4.8k Jan 3, 2023
[ON HOLD] Living Style Guides Engine and Maintenance Environment for Front-end Components. Core repository.

[ON HOLD] SourceJS - Living Style Guide Platform The project been stale for a while and currently is in the [ON HOLD] state until we find new maintain

SourceJS 552 Nov 8, 2022
Express js webserver integration with edgejs templating engine using webpack assets manager and hot reloading

Express js webserver integration with edgejs templating engine using webpack assets manager and hot reloading

Aria Khoshnood 4 Feb 12, 2022
Spectre.css - A Lightweight, Responsive and Modern CSS Framework

Spectre.css Spectre.css is a lightweight, responsive and modern CSS framework. Lightweight (~10KB gzipped) starting point for your projects Flexbox-ba

Yan Zhu 11.1k Jan 8, 2023
Low-level CSS Toolkit – the original Functional/Utility/Atomic CSS library

Basscss Low-level CSS toolkit – the original Functional CSS library https://basscss.com Lightning-Fast Modular CSS with No Side Effects Basscss is a l

Basscss 5.8k Dec 31, 2022