Skip to content

Commit

Permalink
Support arbitrary values for object-position
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed Jun 14, 2021
1 parent 0d47ffd commit 81816df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/plugins/objectPosition.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ import createUtilityPlugin from '../util/createUtilityPlugin'
import { asLookupValue } from '../util/pluginUtils'

export default function () {
return createUtilityPlugin('objectPosition', [['object', ['object-position']]], {
resolveArbitraryValue: asLookupValue,
})
return createUtilityPlugin('objectPosition', [['object', ['object-position']]])
}
3 changes: 3 additions & 0 deletions tests/jit/arbitrary-values.test.css
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@
.stroke-\[\#da5b66\] {
stroke: #da5b66;
}
.object-\[var\(--position\)\] {
object-position: var(--position);
}
.p-\[var\(--app-padding\)\] {
padding: var(--app-padding);
}
Expand Down
1 change: 1 addition & 0 deletions tests/jit/arbitrary-values.test.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
<div class="from-[var(--color)] via-[var(--color)] to-[var(--color)]"></div>
<div class="fill-[#da5b66]"></div>
<div class="fill-[var(--color)]"></div>
<div class="object-[var(--position)]"></div>
<div class="stroke-[#da5b66]"></div>
<div class="leading-[var(--leading)]"></div>
<div class="tracking-[var(--tracking)]"></div>
Expand Down

0 comments on commit 81816df

Please sign in to comment.