Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
@unocss/transformer-compile-class
Advanced tools
Compile group of classes into one class. Inspired by WindiCSS's compilation mode and #948 by @UltraCakeBakery.
npm i -D @unocss/transformer-compile-class
import transformerCompileClass from '@unocss/transformer-compile-class'
// uno.config.ts
import { defineConfig } from 'unocss'
export default defineConfig({
// ...
transformers: [
transformerCompileClass(),
],
})
At the begin of your class strings, add :uno:
at the begin of the strings to mark them for compilation. For example:
<div class=":uno: text-center sm:text-left">
<div class=":uno: text-sm font-bold hover:text-red"/>
</div>
Will be compiled to:
<div class="uno-qlmcrp">
<div class="uno-0qw2gr"/>
</div>
.uno-qlmcrp {
text-align: center;
}
.uno-0qw2gr {
font-size: 0.875rem;
line-height: 1.25rem;
font-weight: 700;
}
.uno-0qw2gr:hover {
--un-text-opacity: 1;
color: rgb(248 113 113 / var(--un-text-opacity));
}
@media (min-width: 640px) {
.uno-qlmcrp {
text-align: left;
}
}
You can config the trigger string and prefix for compile class with the options. Refers to the types for details.
MIT License © 2021-PRESENT Anthony Fu
FAQs
Compile group of classes into one class
We found that @unocss/transformer-compile-class demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.