https://github.com/kennethormandy/font-feature-fibbing
Hey, do you support the font-feature-settings CSS property? Safari, look—I know you’re lying!
https://github.com/kennethormandy/font-feature-fibbing
Last synced: over 1 year ago
JSON representation
Hey, do you support the font-feature-settings CSS property? Safari, look—I know you’re lying!
- Host: GitHub
- URL: https://github.com/kennethormandy/font-feature-fibbing
- Owner: kennethormandy
- License: mit
- Created: 2014-11-23T04:33:48.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-26T00:05:42.000Z (over 10 years ago)
- Last Synced: 2025-03-25T02:39:57.726Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://kennethormandy.com
- Size: 85.9 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://github.com/kennethormandy/font-feature-fibbing)
***
# Font Feature Fibbing
Hey, do you support the `font-feature-settings` CSS property? Safari, look—I know you’re lying!
This module is (somewhat intentionally) simple—you will find out whether or not `font-feature-settings` is supported, but not _what_ `font-feature-settings` specifically. Its primary target is Safari v9.2 and lower, which misrepresented whether or not it actually exposed `font-feature-settings` to front-end designers and developers.
## Getting started
If you’re using [Browserify](http://browserify.org), first install the project:
```sh
npm install --save font-feature-fibbing
```
Then, `require` it and do something based on the result.
```js
var supportsFontFeatureSettings = require('font-feature-fibbing');
if (!supportsFontFeatureSettings()) {
// Add a class to ``
document.documentElement.className += ' is-withoutFontFeatureSettings';
}
```
If you’re not using a module system, you can also dropin the [font-feature-fibbing.js](dist/font-feature-fibbing.js) file with a similar result:
```html
if (!supportsFontFeatureSettings()) {
// Vent to the user
alert('ugh I really wish you could see these ligatures');
}
```
In this case you’ll almost definitely want to include it with whatever other build process you’re using to include `font-feature-fibbing.js` in your main JavaScript file.
## License
[The MIT License (MIT)](LICENSE.md)
Copyright © 2014–2016 [Kenneth Ormandy](http://kennethormandy.com)