Skip to content

Commit

Permalink
fix: allow string values in outline-offset (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
richbachman committed Apr 10, 2023
1 parent 7ed372f commit 4a82f2a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/polite-bags-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rainbow-sprinkles': patch
---

Changed the type off `outlineOffset` from `<length>` to `<line-width>{1,4}`. This allows valid string sizes to be used such as `px` and `rem` units.
10 changes: 5 additions & 5 deletions packages/rainbow-sprinkles/src/css.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1997,9 +1997,9 @@ export interface StandardLonghandProperties {
/**
* The **`outline-offset`** CSS property sets the amount of space between an outline and the edge or border of an element.
*
* **Syntax**: `<length>`
* **Syntax**: `<line-width>{1,4}`
*
* **Initial value**: `0`
* **Initial value**: `0px`
*
*/
outlineOffset?: Property.OutlineOffset;
Expand Down Expand Up @@ -5534,9 +5534,9 @@ export interface StandardLonghandPropertiesHyphen {
/**
* The **`outline-offset`** CSS property sets the amount of space between an outline and the edge or border of an element.
*
* **Syntax**: `<length>`
* **Syntax**: `<line-width>{1,4}`
*
* **Initial value**: `0`
* **Initial value**: `0px`
*
*/
'outline-offset'?: Property.OutlineOffset;
Expand Down Expand Up @@ -8755,7 +8755,7 @@ export namespace Property {

export type OutlineColor = DataType.Color | 'invert';

export type OutlineOffset = number;
export type OutlineOffset = DataType.LineWidth | OnlyString;

export type OutlineStyle = DataType.LineStyle | 'auto' | OnlyString;

Expand Down

0 comments on commit 4a82f2a

Please sign in to comment.