Skip to content

Commit

Permalink
Ensure repeating-conic-gradient is detected as an image (#11180)
Browse files Browse the repository at this point in the history
* ensure `repeating-conic-gradient` is detected as an image
* update changelog
  • Loading branch information
RobinMalfait authored and thecrypticace committed Jul 13, 2023
1 parent 81ccfd9 commit 267e4e0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fix issue where some pseudo-element variants generated the wrong selector ([#10943](https://github.com/tailwindlabs/tailwindcss/pull/10943), [#10962](https://github.com/tailwindlabs/tailwindcss/pull/10962))
- Fix parsing of `theme()` inside `calc()` when there are no spaces around operators ([#11157](https://github.com/tailwindlabs/tailwindcss/pull/11157))
- Ensure `repeating-conic-gradient` is detected as an image ([#11180](https://github.com/tailwindlabs/tailwindcss/pull/11180))

## [3.3.2] - 2023-04-25

Expand Down
3 changes: 2 additions & 1 deletion src/util/dataTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,12 @@ export function image(value) {
}

let gradientTypes = new Set([
'conic-gradient',
'linear-gradient',
'radial-gradient',
'repeating-conic-gradient',
'repeating-linear-gradient',
'repeating-radial-gradient',
'conic-gradient',
])
export function gradient(value) {
value = normalize(value)
Expand Down
3 changes: 3 additions & 0 deletions tests/arbitrary-values.oxide.test.css
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,9 @@
.bg-\[linear-gradient\(to_left\,rgb\(var\(--green\)\)\,blue\)\] {
background-image: linear-gradient(to left, rgb(var(--green)), blue);
}
.bg-\[repeating-conic-gradient\(\#F8F9FA_0\%_25\%\,_white_0\%_50\%\)\] {
background-image: repeating-conic-gradient(#f8f9fa 0% 25%, white 0% 50%);
}
.bg-\[url\(\'\/path-to-image\.png\'\)\] {
background-image: url('/path-to-image.png');
}
Expand Down
3 changes: 3 additions & 0 deletions tests/arbitrary-values.test.css
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,9 @@
.bg-\[linear-gradient\(to_left\,rgb\(var\(--green\)\)\,blue\)\] {
background-image: linear-gradient(to left, rgb(var(--green)), blue);
}
.bg-\[repeating-conic-gradient\(\#F8F9FA_0\%_25\%\,_white_0\%_50\%\)\] {
background-image: repeating-conic-gradient(#f8f9fa 0% 25%, white 0% 50%);
}
.bg-\[url\(\'\/path-to-image\.png\'\)\] {
background-image: url('/path-to-image.png');
}
Expand Down
1 change: 1 addition & 0 deletions tests/arbitrary-values.test.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
<div class="bg-[var(--value1)_var(--value2)]"></div>
<div class="bg-[color:var(--value1)_var(--value2)]"></div>
<div class="bg-[linear-gradient(to_left,rgb(var(--green)),blue)]"></div>
<div class="bg-[repeating-conic-gradient(#F8F9FA_0%_25%,_white_0%_50%)]"></div>

<div class="bg-[url('/path-to-image.png')] bg-[url:var(--url)]"></div>
<div class="bg-[linear-gradient(#eee,#fff)]"></div>
Expand Down

0 comments on commit 267e4e0

Please sign in to comment.