
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
tailwindcss-scrim-gradients
Advanced tools
Gradient scrim overlays are a common pattern employed to preserve legibility of text, or to suggest further content out-of-bounds. These utilities allow you to pair an edge or axis with a distance value, and produce an eased gradient overlay: `scrim-b-12`
Gradient scrim overlays are a common pattern employed to preserve legibility of text, or to suggest further content out-of-bounds. These utilities allow you to pair an edge or axis with a distance value, and produce an eased gradient overlay: scrim-b-12
.
Install the plugin:
npm install -D tailwindcss-scrim-gradients
Then add it to your tailwind.config.js
file:
// tailwind.config.js
module.exports = {
theme: {
// ...
},
plugins: [
require('tailwindcss-scrim-gradients'),
// ...
],
};
Combine color and distance utilities to generate a scrim:
<div class="scrim-b-16 dark:scrim-black/70">
<!-- ... -->
</div>
Shorthand utilities work exactly as you would expect:
<div class="scrim-20 scrim-x-12 scrim-r-0">
<!-- ... -->
</div>
The scrim uses the ::after pseudo-element to apply the overlay, and can not be used with the respective Tailwind variants. This also means that the containing element will default to relative positioning. Whatever position value you set will be respected, so long as you do not specify 'static'.
Gradient stacking is achieved through mask-image, which has good browser support when used with PostCSS plugins such as autoprefixer
.
FAQs
Gradient scrim overlays are a common pattern employed to preserve legibility of text, or to suggest further content out-of-bounds. These utilities allow you to pair an edge or axis with a distance value, and produce an eased gradient overlay: `scrim-b-12`
The npm package tailwindcss-scrim-gradients receives a total of 7 weekly downloads. As such, tailwindcss-scrim-gradients popularity was classified as not popular.
We found that tailwindcss-scrim-gradients demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.