Socket
Socket
Sign inDemoInstall

@csstools/postcss-gradients-interpolation-method

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@csstools/postcss-gradients-interpolation-method - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

6

CHANGELOG.md
# Changes to PostCSS Gradients Interpolation Method
### 3.0.0 3.0.0 (March 25, 2023)
### 3.0.1 (March 28, 2023)
- Skip gamut mapping for interpolation color hints.
### 3.0.0 (March 25, 2023)
- Handle `color-mix()` internally with `@csstools/css-color-parser`

@@ -6,0 +10,0 @@

2

dist/color-stop-list.d.ts

@@ -9,2 +9,2 @@ import type { ColorData } from '@csstools/css-color-parser';

};
export declare function interpolateColorsInColorStopsList(colorStops: Array<ColorStop>, colorSpace: TokenNode, hueInterpolationMethod: TokenNode | null): Array<ComponentValue> | false;
export declare function interpolateColorsInColorStopsList(colorStops: Array<ColorStop>, colorSpace: TokenNode, hueInterpolationMethod: TokenNode | null, wideGamut?: boolean): Array<ComponentValue> | false;
import type { PluginCreator } from 'postcss';
/** postcss-gradients-interpolation-method plugin options */
export type pluginOptions = {
/** Preserve the original notation. default: false */
/** Preserve the original notation. default: true */
preserve?: boolean;

@@ -6,0 +6,0 @@ /** Enable "@csstools/postcss-progressive-custom-properties". default: true */

import type { ComponentValue, FunctionNode } from '@csstools/css-parser-algorithms';
export declare function modifyGradientFunctionComponentValues(gradientFunction: FunctionNode): Array<ComponentValue> | false;
export declare function modifyGradientFunctionComponentValues(gradientFunction: FunctionNode, wideGamut?: boolean): Array<ComponentValue> | false;
{
"name": "@csstools/postcss-gradients-interpolation-method",
"description": "Use interpolation methods in CSS gradient functions",
"version": "3.0.0",
"version": "3.0.1",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",

@@ -32,3 +32,3 @@ "license": "CC0-1.0",

"dependencies": {
"@csstools/css-color-parser": "^1.0.0",
"@csstools/css-color-parser": "^1.1.0",
"@csstools/css-parser-algorithms": "^2.1.0",

@@ -35,0 +35,0 @@ "@csstools/css-tokenizer": "^2.1.0",

@@ -12,4 +12,4 @@ # PostCSS Gradients Interpolation Method [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][PostCSS]

.example {
background-image: linear-gradient(in oklab, hsl(96, 42%, 24%) 0%, hsl(302, 67%, 25%) 100%);
:root {
--background-image: linear-gradient(in oklab, hsl(96, 42%, 24%) 0%, hsl(302, 67%, 25%) 100%);
}

@@ -24,6 +24,11 @@

.example {
background-image: linear-gradient(rgb(56, 87, 35) 0%, rgb(64, 83, 46), rgb(70, 79, 54), rgb(76, 74, 62), rgb(82, 69, 68), rgb(86, 64, 75), rgb(91, 58, 81), rgb(95, 51, 87), rgb(99, 44, 93), rgb(103, 34, 98), rgb(106, 21, 104) 100%);
background-image: linear-gradient(in oklab, hsl(96, 42%, 24%) 0%, hsl(302, 67%, 25%) 100%);
:root {
--background-image: linear-gradient(rgb(56, 87, 35) 0%, rgb(64, 83, 46), rgb(70, 79, 54), rgb(76, 74, 62), rgb(82, 69, 68), rgb(86, 64, 75), rgb(91, 58, 81), rgb(95, 51, 87), rgb(99, 44, 93), rgb(103, 34, 98), rgb(106, 21, 104) 100%);
}
@supports (background: linear-gradient(in oklch, red 0%, red 0% 1%, red 2%)) and (color: hsl(0 0% 0% / 0)) {
:root {
--background-image: linear-gradient(in oklab, hsl(96, 42%, 24%) 0%, hsl(302, 67%, 25%) 100%);
}
}
```

@@ -94,6 +99,6 @@

The `preserve` option determines whether the original notation
is preserved. By default, it is not preserved.
is preserved. By default, it is preserved.
```js
postcssGradientsInterpolationMethod({ preserve: true })
postcssGradientsInterpolationMethod({ preserve: false })
```

@@ -106,4 +111,4 @@

.example {
background-image: linear-gradient(in oklab, hsl(96, 42%, 24%) 0%, hsl(302, 67%, 25%) 100%);
:root {
--background-image: linear-gradient(in oklab, hsl(96, 42%, 24%) 0%, hsl(302, 67%, 25%) 100%);
}

@@ -115,8 +120,6 @@

background-image: linear-gradient(rgb(245, 137, 137) 0%, rgb(248, 146, 114), rgb(244, 158, 94), rgb(235, 171, 82), rgb(220, 185, 81), rgb(201, 199, 95), rgb(177, 211, 118), rgb(151, 221, 146), rgb(125, 229, 177), rgb(103, 235, 208), rgb(94, 237, 237) 100%);
background-image: linear-gradient(in oklch, hsl(0deg 85% 75%) 0%, hsl(180deg 80% 65%) 100%);
}
.example {
background-image: linear-gradient(rgb(56, 87, 35) 0%, rgb(64, 83, 46), rgb(70, 79, 54), rgb(76, 74, 62), rgb(82, 69, 68), rgb(86, 64, 75), rgb(91, 58, 81), rgb(95, 51, 87), rgb(99, 44, 93), rgb(103, 34, 98), rgb(106, 21, 104) 100%);
background-image: linear-gradient(in oklab, hsl(96, 42%, 24%) 0%, hsl(302, 67%, 25%) 100%);
:root {
--background-image: linear-gradient(rgb(56, 87, 35) 0%, rgb(64, 83, 46), rgb(70, 79, 54), rgb(76, 74, 62), rgb(82, 69, 68), rgb(86, 64, 75), rgb(91, 58, 81), rgb(95, 51, 87), rgb(99, 44, 93), rgb(103, 34, 98), rgb(106, 21, 104) 100%);
}

@@ -141,4 +144,4 @@ ```

.example {
background-image: linear-gradient(in oklab, hsl(96, 42%, 24%) 0%, hsl(302, 67%, 25%) 100%);
:root {
--background-image: linear-gradient(in oklab, hsl(96, 42%, 24%) 0%, hsl(302, 67%, 25%) 100%);
}

@@ -153,5 +156,5 @@

.example {
background-image: linear-gradient(rgb(56, 87, 35) 0%, rgb(64, 83, 46), rgb(70, 79, 54), rgb(76, 74, 62), rgb(82, 69, 68), rgb(86, 64, 75), rgb(91, 58, 81), rgb(95, 51, 87), rgb(99, 44, 93), rgb(103, 34, 98), rgb(106, 21, 104) 100%);
background-image: linear-gradient(in oklab, hsl(96, 42%, 24%) 0%, hsl(302, 67%, 25%) 100%);
:root {
--background-image: linear-gradient(rgb(56, 87, 35) 0%, rgb(64, 83, 46), rgb(70, 79, 54), rgb(76, 74, 62), rgb(82, 69, 68), rgb(86, 64, 75), rgb(91, 58, 81), rgb(95, 51, 87), rgb(99, 44, 93), rgb(103, 34, 98), rgb(106, 21, 104) 100%);
--background-image: linear-gradient(in oklab, hsl(96, 42%, 24%) 0%, hsl(302, 67%, 25%) 100%);
}

@@ -158,0 +161,0 @@ ```

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc