Skip to content

Conversation

@EmilTholin
Copy link
Contributor

This PR will add the ability to pass a function to the prefix option, as discussed in #330.

{
  // ...
  options: {
    prefix: function (selector) {
      if (selector === '.foo') {
        return 'tw-'
      }

      return ''  
    },
    important: false,
    separator: ':',
  },
  // ...
}

@adamwathan
Copy link
Member

Don't sweat the docs; that should be a separate PR at the very least or I can just handle it. Reason being we serve master for the docs site, and this feature won't be in the current release.

Thanks for this, merging!

@adamwathan adamwathan merged commit 357c873 into tailwindlabs:master Jan 28, 2018
@EmilTholin EmilTholin deleted the function_prefix branch January 28, 2018 21:04
thecrypticace pushed a commit that referenced this pull request Sep 26, 2025
Here is everything you need to know about this update. Please take a
good look at what changed and the test results before merging this pull
request.

### What changed?




#### ✳️ @​tailwindcss/typography (0.5.16 → 0.5.19) ·
[Repo](https://github.com/tailwindlabs/tailwindcss-typography) ·
[Changelog](https://github.com/tailwindlabs/tailwindcss-typography/blob/main/CHANGELOG.md)



<details>
<summary>Release Notes</summary>
<h4><a
href="https://github.com/tailwindlabs/tailwindcss-typography/releases/tag/v0.5.19">0.5.19</a></h4>

<blockquote><h3 dir="auto">Fixed</h3>
<ul dir="auto">
<li>Fixed broken color styles (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/405">#405</a>)</li>
</ul></blockquote>
<h4><a
href="https://github.com/tailwindlabs/tailwindcss-typography/releases/tag/v0.5.18">0.5.18</a></h4>

<blockquote><h3 dir="auto">Fixed</h3>
<ul dir="auto">
<li>Fixed undefined variable error (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/403">#403</a>)</li>
</ul></blockquote>
<h4><a
href="https://github.com/tailwindlabs/tailwindcss-typography/releases/tag/v0.5.17">0.5.17</a></h4>

<blockquote><h3 dir="auto">Added</h3>
<ul dir="auto">
<li>Add modifiers for description list elements (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/357">#357</a>)</li>
<li>Add <code class="notranslate">prose-picture</code> modifier (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/367">#367</a>)</li>
</ul>
<h3 dir="auto">Fixed</h3>
<ul dir="auto">
<li>Include unit in <code class="notranslate">hr</code> border-width
value (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/379">#379</a>)</li>
<li>Ensure <code class="notranslate">&lt;kbd&gt;</code> styles work with
Tailwind CSS v4 (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/387">#387</a>)</li>
</ul>
<h3 dir="auto">Changed</h3>
<ul dir="auto">
<li>Remove lodash dependencies (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/402">#402</a>)</li>
</ul></blockquote>
<p><em>Does any of this look wrong? <a
href="https://depfu.com/packages/npm/@tailwindcss%2Ftypography/feedback">Please
let us know.</a></em></p>
</details>

<details>
<summary>Commits</summary>
<p><a
href="https://github.com/tailwindlabs/tailwindcss-typography/compare/39d20e194940903046f2e2733ce0a9b59ccd464b...e002ab89ad8f4202638249c1c300c0cf0b3739c5">See
the full diff on Github</a>. The new version differs by 22 commits:</p>
<ul>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/e002ab89ad8f4202638249c1c300c0cf0b3739c5"><code>0.5.19</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/bbb1c21099e34ff4d1d7f82f7528b85e71ed3c5a"><code>Fix
bad RGB syntax (#405)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/b316f958af5bc12a981526c3091d8319626e274e"><code>0.5.18</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/ed952066e698dbb65a2f082eeb903ccba5a6834a"><code>Fix
variable declaration in opacity function (#403)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/7efcb4a499e6ede67088e28393a906d4d089e580"><code>0.5.17</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/e0ec248bafa002d589509e29bfd9f054570e6d85"><code>chore(ci):
update actions for release insiders</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/511afcb0bd9732eb8fcdc703f35ff76e57bfcd7b"><code>Add
modifiers for description list elements (#357)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/042a531528cd3ddecafda94fe972394dc8aab6ae"><code>Add
`prose-picture` modifiers (#367)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/f822222ae6e289e8cc0b23636891dc3545d5682a"><code>Fix
`kbd` shadow colors not being calculated on oklch colors
(#387)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/ecb7e87a52d86afbbff64200d40f05fe59433039"><code>Add
Tailwind v4 custom color theme example to README (#396)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/ecb7d5c435fbdf907a1224a453539143c802a75c"><code>Remove
lodash dependencies (#402)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/b7cdf1e1ec98381e337800bc78863c0bbc72d6a5"><code>Clarify
&#39;not-prose&#39; usage when using prefixes (#399)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/25051fbfd7c7058708233b1b4c6280f039e5855d"><code>Fix
syntax highlighting in readme</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/d3c1fbdc604902bc20049ce936d1410adbd6771c"><code>Include
v3 installation instructions alongside v4 (#388)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/632970e3ce6fc10d1bfd8fb46cc9083d0d32986d"><code>Readme:
Remove unused `{theme}` (#385)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/c92dc1c120f71d402a54becd6958af692ff426dd"><code>Fix
typo in comments (#378)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/3e75cb04808f80b0e30b8c6fad2e4212917b194f"><code>Change
the borderTopWidth value for hr from integer to a pixel value
(#379)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/1a6972e6902df5ff63c85399e0418cbfce7855fb"><code>Rectify
variant order Closes #376</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/0ab25dc0ff97505a75c966d3f9a020cd8a543ceb"><code>Fix
plugin import path in README.md (#382)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/fb252ece730f228dfc9ae1c61de79c3ac0025d5c"><code>Fix
syntax errors in Readme.md (#381)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/43a4c2c2fa1932a9b39f84188b2a6bef6e1a0131"><code>Update
README for Tailwind CSS v4 (#380)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/d1e6421d4c07c15b3e1db6b6b10549df96fb129d"><code>Update
README.md</code></a></li>
</ul>
</details>












---
![Depfu
Status](https://depfu.com/badges/edd6acd35d74c8d41cbb540c30442adf/stats.svg)

[Depfu](https://depfu.com) will automatically keep this PR
conflict-free, as long as you don't add any commits to this branch
yourself. You can also trigger a rebase manually by commenting with
`@depfu rebase`.

<details><summary>All Depfu comment commands</summary>
<blockquote><dl>
<dt>@​depfu rebase</dt><dd>Rebases against your default branch and
redoes this update</dd>
<dt>@​depfu recreate</dt><dd>Recreates this PR, overwriting any edits
that you've made to it</dd>
<dt>@​depfu merge</dt><dd>Merges this PR once your tests are passing and
conflicts are resolved</dd>
<dt>@​depfu cancel merge</dt><dd>Cancels automatic merging of this
PR</dd>
<dt>@​depfu close</dt><dd>Closes this PR and deletes the branch</dd>
<dt>@​depfu reopen</dt><dd>Restores the branch and reopens this PR (if
it's closed)</dd>
<dt>@​depfu pause</dt><dd>Ignores all future updates for this dependency
and closes this PR</dd>
<dt>@​depfu pause [minor|major]</dt><dd>Ignores all future minor/major
updates for this dependency and closes this PR</dd>
<dt>@​depfu resume</dt><dd>Future versions of this dependency will
create PRs again (leaves this PR as is)</dd>
</dl></blockquote>
</details>

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants