Gathering detailed insights and metrics for @limetech/mdc-feature-targeting
Gathering detailed insights and metrics for @limetech/mdc-feature-targeting
Gathering detailed insights and metrics for @limetech/mdc-feature-targeting
Gathering detailed insights and metrics for @limetech/mdc-feature-targeting
Forked version that uses rem instead of px
npm install @limetech/mdc-feature-targeting
Typescript
Module System
Node Version
NPM Version
48.5
Supply Chain
75.2
Quality
80.8
Maintenance
100
Vulnerability
100
License
JavaScript (36.4%)
HTML (33.07%)
TypeScript (15.71%)
CSS (14.54%)
Shell (0.28%)
Total Downloads
67,613
Last Day
80
Last Week
97
Last Month
167
Last Year
1,241
MIT License
1 Stars
5,492 Commits
11 Watchers
201 Branches
1 Contributors
Updated on Feb 07, 2021
Latest Version
4.0.1-p4.0.0.1
Package Id
@limetech/mdc-feature-targeting@4.0.1-p4.0.0.1
Unpacked Size
12.97 kB
Size
3.65 kB
File Count
5
NPM Version
6.13.2
Node Version
12.13.0
Cumulative downloads
Total Downloads
Last Day
3,900%
80
Compared to previous day
Last Week
304.2%
97
Compared to previous week
Last Month
85.6%
167
Compared to previous month
Last Year
-18.5%
1,241
Compared to previous year
No dependencies detected.
MDC Feature Targeting provides infrastructure to allow CSS styles to be included or excluded categorically.
Most of the time, you shouldn't need to depend on mdc-feature-targeting
directly. However, understanding it can be useful if you're interested in having more control over when certain types of MDC styles are emitted.
npm install @limetech/mdc-feature-targeting
Authoring component styles:
1@import "@limetech/mdc-feature-targeting/functions"; 2@import "@limetech/mdc-feature-targeting/mixins"; 3 4@mixin my-component-core-styles($query: mdc-feature-all()) { 5 $feat-structure: mdc-feature-create-target($query, structure); 6 7 @include mdc-feature-targets($feat-structure) { 8 // ... 9 } 10}
Consuming component styles:
1@import "@limetech/mdc-feature-targeting/functions"; 2@import "my-component-mixins"; 3 4// To include all styles (using the default of mdc-feature-all() defined above): 5@include my-component-core-styles; 6 7// Or, to include a specific subset of styles: 8@include my-component-core-styles(structure); 9@include my-component-core-styles(mdc-feature-any(color, typography)); 10// The above two @includes and the following @include would produce equivalent results: 11@include my-component-core-styles(mdc-feature-without(animation));
Mixin | Description |
---|---|
mdc-feature-targets($feature-targets...) | Conditionalizes content to only be emitted if the given feature target(s) is/are queried. |
Function | Description |
---|---|
mdc-feature-create-target($feature-query, $targeted-feature) | Returns a variable to be passed to mdc-feature-targets in order to filter emitted styles. |
mdc-feature-all($feature-queries...) | Returns a query object which will result in emitting mdc-feature-targets blocks that match all of the specified features. Passing no arguments results in all blocks being emitted, which is the most common use case. |
mdc-feature-any($feature-queries...) | Returns a query object which will result in emitting mdc-feature-targets blocks that match any of the specified features. Passing no arguments results in no blocks being emitted. |
mdc-feature-without($feature-query) | Returns a query object which will result in emitting mdc-feature-targets blocks that do not match the specified feature. |
$feature-query
and $feature-queries
refer to one or more of the values listed below under Supported Features.
MDC Web's styles are currently split according to the following features:
structure
- All baseline styles that don't fit into any other categoryanimation
- Styles responsible for causing animations and transitions to occurcolor
- Color-specific styles which rely on mdc-theme
variablestypography
- Typography-specific styles which rely on mdc-typography
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
189 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More