Socket
Socket
Sign inDemoInstall

postcss-color-hex-alpha

Package Overview
Dependencies
5
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.0.3 to 8.0.4

dist/index.d.ts

4

CHANGELOG.md
# Changes to PostCSS Color Hex Alpha
### 8.0.4 (June 10, 2022)
- Fixed: Issue with SVG hashes being interpreted as hex colors
### 8.0.3 (February 5, 2022)

@@ -4,0 +8,0 @@

168

package.json
{
"name": "postcss-color-hex-alpha",
"version": "8.0.3",
"description": "Use 4 & 8 character hex color notation in CSS",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"contributors": [
"Maxime Thirouin"
],
"license": "MIT",
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-hex-alpha#readme",
"bugs": "https://github.com/csstools/postcss-plugins/issues",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"default": "./dist/index.mjs"
}
},
"files": [
"CHANGELOG.md",
"LICENSE.md",
"README.md",
"dist",
"index.d.ts"
],
"scripts": {
"build": "rollup -c ../../rollup/default.js",
"clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true });\"",
"lint": "eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern",
"prepublishOnly": "npm run clean && npm run build && npm run test",
"stryker": "stryker run --logLevel error",
"test": "postcss-tape --ci && npm run test:exports",
"test:exports": "node ./test/_import.mjs && node ./test/_require.cjs"
},
"engines": {
"node": "^12 || ^14 || >=16"
},
"dependencies": {
"postcss-value-parser": "^4.2.0"
},
"devDependencies": {
"postcss": "^8.3.6",
"postcss-tape": "^6.0.1"
},
"peerDependencies": {
"postcss": "^8.4"
},
"keywords": [
"postcss",
"css",
"postcss-plugin",
"color",
"hex",
"alpha",
"transparent",
"transparency",
"4-digit",
"8-digit",
"w3c",
"csswg",
"specification",
"spec"
],
"repository": {
"type": "git",
"url": "https://github.com/csstools/postcss-plugins.git",
"directory": "plugins/postcss-color-hex-alpha"
},
"volta": {
"extends": "../../package.json"
}
"name": "postcss-color-hex-alpha",
"description": "Use 4 & 8 character hex color notation in CSS",
"version": "8.0.4",
"contributors": [
{
"name": "Antonio Laguna",
"email": "antonio@laguna.es",
"url": "https://antonio.laguna.es"
},
{
"name": "Romain Menke",
"email": "romainmenke@gmail.com"
},
{
"name": "Jonathan Neal",
"email": "jonathantneal@hotmail.com"
},
{
"name": "Maxime Thirouin"
}
],
"license": "MIT",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/csstools"
},
"engines": {
"node": "^12 || ^14 || >=16"
},
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"default": "./dist/index.mjs"
}
},
"files": [
"CHANGELOG.md",
"LICENSE.md",
"README.md",
"dist"
],
"dependencies": {
"postcss-value-parser": "^4.2.0"
},
"peerDependencies": {
"postcss": "^8.4"
},
"scripts": {
"build": "rollup -c ../../rollup/default.js",
"clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true });\"",
"docs": "node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs",
"lint": "npm run lint:eslint && npm run lint:package-json",
"lint:eslint": "eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern",
"lint:package-json": "node ../../.github/bin/format-package-json.mjs",
"prepublishOnly": "npm run clean && npm run build && npm run test",
"test": "node .tape.mjs && npm run test:exports",
"test:exports": "node ./test/_import.mjs && node ./test/_require.cjs",
"test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs"
},
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-hex-alpha#readme",
"repository": {
"type": "git",
"url": "https://github.com/csstools/postcss-plugins.git",
"directory": "plugins/postcss-color-hex-alpha"
},
"bugs": "https://github.com/csstools/postcss-plugins/issues",
"keywords": [
"4-digit",
"8-digit",
"alpha",
"color",
"css",
"csswg",
"hex",
"postcss",
"postcss-plugin",
"spec",
"specification",
"transparency",
"transparent",
"w3c"
],
"csstools": {
"cssdbId": "hexadecimal-alpha-notation",
"exportName": "postcssColorHexAlpha",
"humanReadableName": "PostCSS Color Hex Alpha",
"specUrl": "https://www.w3.org/TR/css-color-4/#hex-notation"
},
"volta": {
"extends": "../../package.json"
}
}

@@ -1,7 +0,4 @@

# PostCSS Color Hex Alpha [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]
# PostCSS Color Hex Alpha [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss]
[![NPM Version][npm-img]][npm-url]
[![CSS Standard Status][css-img]][css-url]
[![Build Status][cli-img]][cli-url]
[<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord]
[<img alt="npm version" src="https://img.shields.io/npm/v/postcss-color-hex-alpha.svg" height="20">][npm-url] [<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/hexadecimal-alpha-notation.svg" height="20">][css-url] [<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url] [<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord]

@@ -11,7 +8,5 @@ [PostCSS Color Hex Alpha] lets you use 4 & 8 character hex color notation in

[!['Can I use' table](https://caniuse.bitsofco.de/image/css-rrggbbaa.png)](https://caniuse.com/#feat=css-rrggbbaa)
```pcss
body {
background: #9d9c;
background: #9d9c;
}

@@ -22,3 +17,3 @@

body {
background: rgba(153, 221, 153, 0.8);
background: rgba(153,221,153,0.8);
}

@@ -32,6 +27,6 @@ ```

```bash
npm install postcss-color-hex-alpha --save-dev
npm install postcss postcss-color-hex-alpha --save-dev
```
Use [PostCSS Color Hex Alpha] as a [PostCSS] plugin:
Use it as a [PostCSS] plugin:

@@ -43,7 +38,8 @@ ```js

postcss([
postcssColorHexAlpha(/* pluginOptions */)
postcssColorHexAlpha(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);
```
[PostCSS Color Hex Alpha] runs in all Node environments, with special instructions for:
[PostCSS Color Hex Alpha] runs in all Node environments, with special
instructions for:

@@ -57,9 +53,7 @@ | [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |

The `preserve` option determines whether 4 & 8 character hex color notation
should be preserved in their original form. By default, these are not preserved.
The `preserve` option determines whether the original notation
is preserved. By default, it is not preserved.
```js
postcssColorHexAlpha({
preserve: true
});
postcssColorHexAlpha({ preserve: true })
```

@@ -69,3 +63,3 @@

body {
background: #9d9c;
background: #9d9c;
}

@@ -76,17 +70,17 @@

body {
background: rgba(153, 221, 153, 0.8);
background: #9d9c;
background: rgba(153,221,153,0.8);
background: #9d9c;
}
```
[cli-img]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml/badge.svg
[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
[css-img]: https://cssdb.org/images/badges/hexadecimal-alpha-notation.svg
[css-url]: https://cssdb.org/#hexadecimal-alpha-notation
[discord]: https://discord.gg/bUadyRwkJS
[npm-img]: https://img.shields.io/npm/v/postcss-color-hex-alpha.svg
[npm-url]: https://www.npmjs.com/package/postcss-color-hex-alpha
[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
[PostCSS]: https://github.com/postcss/postcss
[PostCSS Loader]: https://github.com/postcss/postcss-loader
[PostCSS Color Hex Alpha]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-hex-alpha
[CSS Color Module]: https://www.w3.org/TR/css-color-4/#hex-notation

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc