postcss-preset-env
Advanced tools
Comparing version 6.0.0 to 6.0.1
# Changes to PostCSS Preset Env | ||
### 6.0.1 (September 20, 2018) | ||
- Fixed: Issue with the `system-ui` font family polyfill by replacing | ||
`postcss-font-family-system-ui` with an internal polyfill, at least until the | ||
problem with the original plugin is resolved. | ||
### 6.0.0 (September 20, 2018) | ||
@@ -4,0 +10,0 @@ |
@@ -5,2 +5,3 @@ 'use strict'; | ||
var postcss = _interopDefault(require('postcss')); | ||
var postcssAttributeCaseInsensitive = _interopDefault(require('postcss-attribute-case-insensitive')); | ||
@@ -18,3 +19,2 @@ var postcssColorFunctionalNotation = _interopDefault(require('postcss-color-functional-notation')); | ||
var postcssFontVariant = _interopDefault(require('postcss-font-variant')); | ||
var postcssFontFamilySystemUi = _interopDefault(require('postcss-font-family-system-ui')); | ||
var postcssGapProperties = _interopDefault(require('postcss-gap-properties')); | ||
@@ -38,4 +38,28 @@ var postcssImageSetPolyfill = _interopDefault(require('postcss-image-set-function')); | ||
var cssdb = _interopDefault(require('cssdb')); | ||
var postcss = _interopDefault(require('postcss')); | ||
var postcssFontFamilySystemUi = postcss.plugin('postcss-system-ui-font', () => root => { | ||
root.walkDecls(propertyRegExp, decl => { | ||
decl.value = decl.value.replace(systemUiMatch, systemUiReplace); | ||
}); | ||
}); | ||
const propertyRegExp = /(?:^(?:-|\\002d){2})|(?:^font(?:-family)?$)/i; | ||
const whitespace = '[\\f\\n\\r\\x09\\x20]'; | ||
const systemUiFamily = ['system-ui', | ||
/* macOS 10.11-10.12 */ | ||
'-apple-system', | ||
/* Windows 6+ */ | ||
'Segoe UI', | ||
/* Android 4+ */ | ||
'Roboto', | ||
/* Ubuntu 10.10+ */ | ||
'Ubuntu', | ||
/* Gnome 3+ */ | ||
'Cantarell', | ||
/* KDE Plasma 5+ */ | ||
'Noto Sans', | ||
/* fallback */ | ||
'sans-serif']; | ||
const systemUiMatch = new RegExp(`(^|,|${whitespace}+)(?:system-ui${whitespace}*)(?:,${whitespace}*(?:${systemUiFamily.join('|')})${whitespace}*)?(,|$)`, 'i'); | ||
const systemUiReplace = `$1${systemUiFamily.join(', ')}$2`; | ||
var plugins = { | ||
@@ -42,0 +66,0 @@ 'all-property': postcssInitial, |
{ | ||
"name": "postcss-preset-env", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"description": "Convert modern CSS into something browsers understand", | ||
@@ -46,3 +46,2 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>", | ||
"postcss-focus-within": "^3.0.0", | ||
"postcss-font-family-system-ui": "^4.1.0", | ||
"postcss-font-variant": "^4.0.0", | ||
@@ -49,0 +48,0 @@ "postcss-gap-properties": "^2.0.0", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
45698
32
360
0
- Removedpostcss-font-family-system-ui@^4.1.0
- Removedpostcss-font-family-system-ui@4.3.0(transitive)