Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
@unocss/rule-utils
Advanced tools
@unocss/rule-utils is a utility package designed to assist with the creation and management of rules in UnoCSS, a highly customizable and performant utility-first CSS framework.
Rule Creation
This feature allows you to create custom CSS rules easily. In the example, a rule for setting the background color to red is created.
const { createRule } = require('@unocss/rule-utils');
const rule = createRule('bg-red', { 'background-color': 'red' });
console.log(rule);
Rule Matching
This feature helps in matching a given rule with a specific pattern. The example checks if the rule matches the 'bg-red' pattern.
const { matchRule } = require('@unocss/rule-utils');
const rule = { 'background-color': 'red' };
const isMatch = matchRule('bg-red', rule);
console.log(isMatch);
Rule Parsing
This feature parses a rule string into a more usable format. The example parses the 'bg-red' rule string.
const { parseRule } = require('@unocss/rule-utils');
const ruleString = 'bg-red';
const parsedRule = parseRule(ruleString);
console.log(parsedRule);
PostCSS is a tool for transforming CSS with JavaScript plugins. It offers a wide range of functionalities for CSS processing, including rule creation and manipulation, similar to @unocss/rule-utils, but with a broader scope.
Stylelint is a modern linter that helps you avoid errors and enforce conventions in your styles. It provides functionalities for rule matching and validation, similar to @unocss/rule-utils, but focuses more on linting and enforcing style rules.
CSSTree is a tool for working with CSS, including parsing, generating, and analyzing CSS. It offers functionalities for rule parsing and manipulation, similar to @unocss/rule-utils, but with a focus on detailed CSS analysis and transformation.
The utilities for creating rules/presets for UnoCSS.
MIT License © 2021-PRESENT Anthony Fu
FAQs
Utilities for UnoCSS
The npm package @unocss/rule-utils receives a total of 180,226 weekly downloads. As such, @unocss/rule-utils popularity was classified as popular.
We found that @unocss/rule-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.