
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
tailwindcss-children
Advanced tools
Tailwind CSS plugin to add a variant that targets child elements, as well as first child and last child variants
npm install tailwindcss-children
// tailwind.config.js
{
variants: {
display: ['children', 'default', 'first-child', 'last-child', 'responsive'],
borderWidth: ['children', 'default', 'first-child', 'last-child', 'responsive'],
borderColor: ['children', 'default', 'first-child', 'last-child', 'responsive'],
},
plugins: [
require('tailwindcss-children')(),
],
}
The above configuration would generate the following classes:
.children\:block > * {
display: block;
}
.block {
display: block;
}
.first-child\:block:first-child {
display: block;
}
.last-child\:block:last-child {
display: block;
}
/* etc. */
Which you can then use in your HTML like this:
<ul class="children:block children:border-b children:border-black last-child:border-b-0">
<li>
First item
</li>
<li>
Second item
</li>
<li>
Last item, this one doesn't have a bottom border
</li>
</ul>
You can also override children:
classes on specific children if needed:
<ul class="children:block children:bg-gray">
<li>
First item
</li>
<li class="bg-red">
Second item, this one has a red background
</li>
<li class="bg-blue">
Third item, this one has a blue background
</li>
<li>
Last item
</li>
</ul>
The above depends on the order of the generated CSS, so make sure to add the default
variant after the children
one in the array of variants.
[1.0.0] - 2019-02-14
Initial release
FAQs
Tailwind CSS plugin to add variants that target child elements
The npm package tailwindcss-children receives a total of 788 weekly downloads. As such, tailwindcss-children popularity was classified as not popular.
We found that tailwindcss-children demonstrated a not healthy version release cadence and project activity because the last version was released 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.
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.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.