Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure repeating-conic-gradient is detected as an image #11180

Merged
merged 2 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,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))
- Make font settings propagate into buttons, inputs, etc. ([#10940](https://github.com/tailwindlabs/tailwindcss/pull/10940))
- 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))

### Added

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