applying transfer to react app

This commit is contained in:
Tyler Koenig
2021-09-20 16:54:47 -04:00
parent 8819f31dd0
commit c612b7d702
37373 changed files with 3775588 additions and 2871 deletions
+43
View File
@@ -0,0 +1,43 @@
# 4.0.1 - 2020-10-28
- Fixed: Incorrect conversion of small-caps ([#15](https://github.com/postcss/postcss-font-variant/pull/15))
# 4.0.0 - 2018-09-17
- Changed: use PostCSS 7 API
# 3.0.0 - 2017-05-11
- Changed: use PostCSS 6 API
# 2.0.1 - 2016-07-08
- Fixed: existing font-feature-settings being duplicated.
([#8](https://github.com/postcss/postcss-font-variant/pull/8) - @ChaosExAnima)
# 2.0.0 - 2015-09-08
- Added: compatibility with postcss v5.x
- Removed: compatiblity with postcss v4.x
# 1.2.0 - 2015-08-13
- Added: compatibility with postcss v4.1.x
([#5](https://github.com/postcss/postcss-font-variant/pull/5))
# 1.1.0 - 2015-01-29
- Fixed: Properly handle font-variant-position:normal ([#3](https://github.com/postcss/postcss-font-variant/pull/3))
- Added: support font-kerning ([#2](https://github.com/postcss/postcss-font-variant/pull/2))
# 1.0.2 - 2015-01-27
- Fixed: Reuse existing font-feature-settings declarations to avoid creating multiples that override themselves ([#1](https://github.com/postcss/postcss-font-variant/pull/1))
# 1.0.1 - 2014-11-11
- Fixed: wrong space char that breaks on some environnements
# 1.0.0 - 2014-10-09
✨ First release based on [rework-font-variant](https://github.com/ianstormtaylor/rework-font-variant) v1.0.1
Generated Vendored Executable
+20
View File
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2014 Maxime Thirouin & Ian Storm Taylor
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Generated Vendored Executable
+74
View File
@@ -0,0 +1,74 @@
# PostCSS Font-Variant [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">](https://github.com/postcss/postcss/)
[![CSS Status](https://cssdb.org/badge/font-variant-property.svg)](https://cssdb.org/#font-variant-property)
[![Build Status](https://travis-ci.org/postcss/postcss-font-variant.svg)](https://travis-ci.org/postcss/postcss-font-variant)
PostCSS Font-Variant lets you use `font-variant` in CSS, following the
[CSS Fonts](https://www.w3.org/TR/css-fonts-3/#font-variant-prop) specification.
## Installation
```console
$ npm install postcss-font-variant
```
## Usage
```js
// dependencies
var postcss = require("postcss")
var fontVariant = require("postcss-font-variant")
// css to be processed
var css = fs.readFileSync("input.css", "utf8")
// process css using postcss-font-variant
var out = postcss()
.use(fontVariant())
.process(css)
.css
```
Using this `input.css`:
```css
h2 {
font-variant-caps: small-caps;
}
table {
font-variant-numeric: lining-nums;
}
```
you will get:
```css
h2 {
font-feature-settings: "smcp";
font-variant-caps: small-caps;
}
table {
font-feature-settings: "lnum";
font-variant-numeric: lining-nums;
}
```
Checkout [tests](test) for more examples.
---
## Contributing
Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.
$ git clone https://github.com/postcss/postcss-font-variant.git
$ git checkout -b patch-1
$ npm install
$ npm test
## [Changelog](CHANGELOG.md)
## [License](LICENSE)
Generated Vendored Executable
+121
View File
@@ -0,0 +1,121 @@
var postcss = require("postcss");
/**
* font variant convertion map
*
* @type {Object}
*/
var fontVariantProperties = {
"font-variant-ligatures": {
"common-ligatures": "\"liga\", \"clig\"",
"no-common-ligatures": "\"liga\", \"clig off\"",
"discretionary-ligatures": "\"dlig\"",
"no-discretionary-ligatures": "\"dlig\" off",
"historical-ligatures": "\"hlig\"",
"no-historical-ligatures": "\"hlig\" off",
contextual: "\"calt\"",
"no-contextual": "\"calt\" off"
},
"font-variant-position": {
sub: "\"subs\"",
"super": "\"sups\"",
normal: "\"subs\" off, \"sups\" off"
},
"font-variant-caps": {
"small-caps": "\"smcp\"",
"all-small-caps": "\"smcp\", \"c2sc\"",
"petite-caps": "\"pcap\"",
"all-petite-caps": "\"pcap\", \"c2pc\"",
unicase: "\"unic\"",
"titling-caps": "\"titl\""
},
"font-variant-numeric": {
"lining-nums": "\"lnum\"",
"oldstyle-nums": "\"onum\"",
"proportional-nums": "\"pnum\"",
"tabular-nums": "\"tnum\"",
"diagonal-fractions": "\"frac\"",
"stacked-fractions": "\"afrc\"",
ordinal: "\"ordn\"",
"slashed-zero": "\"zero\""
},
"font-kerning": {
normal: "\"kern\"",
none: "\"kern\" off"
},
"font-variant": {
normal: "normal",
inherit: "inherit"
}
}
// The `font-variant` property is a shorthand for all the others.
for (var prop in fontVariantProperties) {
var keys = fontVariantProperties[prop]
for (var key in keys) {
if (!(key in fontVariantProperties["font-variant"])) {
fontVariantProperties["font-variant"][key] = keys[key]
}
}
}
// Find font-feature-settings declaration before given declaration,
// create if does not exist
function getFontFeatureSettingsPrevTo(decl) {
var fontFeatureSettings = null;
decl.parent.walkDecls(function(decl) {
if (decl.prop === "font-feature-settings") {
fontFeatureSettings = decl;
}
})
if (fontFeatureSettings === null) {
fontFeatureSettings = decl.clone()
fontFeatureSettings.prop = "font-feature-settings"
fontFeatureSettings.value = ""
decl.parent.insertBefore(decl, fontFeatureSettings)
}
return fontFeatureSettings
}
/**
* Expose the font-variant plugin.
*/
module.exports = postcss.plugin("postcss-font-variant", function() {
return function(styles) {
styles.walkRules(function(rule) {
var fontFeatureSettings = null
// read custom media queries
rule.walkDecls(function(decl) {
if (!fontVariantProperties[decl.prop]) {
return null
}
var newValue = decl.value
if (decl.prop === "font-variant") {
newValue = decl.value.split(/\s+/g).map(function(val) {
return fontVariantProperties["font-variant"][val]
}).join(", ")
}
else if (fontVariantProperties[decl.prop][decl.value]) {
newValue = fontVariantProperties[decl.prop][decl.value]
}
if (fontFeatureSettings === null) {
fontFeatureSettings = getFontFeatureSettingsPrevTo(decl);
}
if (fontFeatureSettings.value && fontFeatureSettings.value !== newValue) {
fontFeatureSettings.value += ", " + newValue;
}
else {
fontFeatureSettings.value = newValue;
}
})
})
}
})
+69
View File
@@ -0,0 +1,69 @@
{
"_from": "postcss-font-variant@^4.0.0",
"_id": "postcss-font-variant@4.0.1",
"_inBundle": false,
"_integrity": "sha512-I3ADQSTNtLTTd8uxZhtSOrTCQ9G4qUVKPjHiDk0bV75QSxXjVWiJVJ2VLdspGUi9fbW9BcjKJoRvxAH1pckqmA==",
"_location": "/postcss-font-variant",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "postcss-font-variant@^4.0.0",
"name": "postcss-font-variant",
"escapedName": "postcss-font-variant",
"rawSpec": "^4.0.0",
"saveSpec": null,
"fetchSpec": "^4.0.0"
},
"_requiredBy": [
"/postcss-preset-env"
],
"_resolved": "https://registry.npmjs.org/postcss-font-variant/-/postcss-font-variant-4.0.1.tgz",
"_shasum": "42d4c0ab30894f60f98b17561eb5c0321f502641",
"_spec": "postcss-font-variant@^4.0.0",
"_where": "/Users/tylerkoenig/Code/personal/react-scss2/node_modules/postcss-preset-env",
"author": {
"name": "Maxime Thirouin"
},
"bugs": {
"url": "https://github.com/postcss/postcss-font-variant/issues"
},
"bundleDependencies": false,
"dependencies": {
"postcss": "^7.0.2"
},
"deprecated": false,
"description": "PostCSS plugin to transform W3C font-variant properties to more compatible CSS (font-feature-settings)",
"devDependencies": {
"jscs": "^3.0.7",
"jshint": "^2.9.6",
"npmpub": "^4.1.0",
"tape": "^4.9.1"
},
"files": [
"index.js"
],
"homepage": "https://github.com/postcss/postcss-font-variant#readme",
"keywords": [
"css",
"postcss",
"postcss-plugin",
"font",
"variant",
"font-variant"
],
"license": "MIT",
"name": "postcss-font-variant",
"repository": {
"type": "git",
"url": "git+https://github.com/postcss/postcss-font-variant.git"
},
"scripts": {
"jscs": "jscs index.js test/index.js",
"jshint": "jshint . --exclude-path .gitignore",
"lint": "npm run jscs && npm run jshint",
"release": "npmpub",
"test": "npm run lint && tape test"
},
"version": "4.0.1"
}