Support any arbitrary value for accentColor
This commit is contained in:
parent
51f71af62c
commit
a5425abd86
3 changed files with 9 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ export default function () {
|
|||
{
|
||||
values: flattenColorPalette(theme('accentColor')),
|
||||
variants: variants('accentColor'),
|
||||
type: 'color',
|
||||
type: ['color', 'any'],
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -333,6 +333,12 @@
|
|||
.placeholder-opacity-\[var\(--placeholder-opacity\)\]::placeholder {
|
||||
--tw-placeholder-opacity: var(--placeholder-opacity);
|
||||
}
|
||||
.accent-\[\#bada55\] {
|
||||
accent-color: #bada55;
|
||||
}
|
||||
.accent-\[var\(--accent-color\)\] {
|
||||
accent-color: var(--accent-color);
|
||||
}
|
||||
.opacity-\[var\(--opacity\)\] {
|
||||
opacity: var(--opacity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,6 +117,8 @@
|
|||
<div class="delay-[var(--delay)]"></div>
|
||||
<div class="content-['hello']"></div>
|
||||
<div class="content-[attr(content-before)]"></div>
|
||||
<div class="accent-[#bada55]"></div>
|
||||
<div class="accent-[var(--accent-color)]"></div>
|
||||
|
||||
<!-- Balancing issues, this is not checking the validity of the actual value, but purely syntax-wise -->
|
||||
<div class="w-[do-not-generate-this]w-[it-is-invalid-syntax]"></div><!-- INVALID -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue