Gathering detailed insights and metrics for @advanced-rest-client/arc-fit-mixin
Gathering detailed insights and metrics for @advanced-rest-client/arc-fit-mixin
Gathering detailed insights and metrics for @advanced-rest-client/arc-fit-mixin
Gathering detailed insights and metrics for @advanced-rest-client/arc-fit-mixin
⛔️ DEPRECATED. Use the `@anypoint-web-components/awc` module instead.
npm install @advanced-rest-client/arc-fit-mixin
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
43 Commits
3 Branches
3 Contributors
Updated on Jan 28, 2023
Latest Version
1.2.3
Package Id
@advanced-rest-client/arc-fit-mixin@1.2.3
Size
10.80 kB
NPM Version
6.14.15
Node Version
14.18.0
Published on
Oct 16, 2021
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Use the @anypoint-web-components/awc
module instead.
This mixin is a port of iron-fit-behavior that works with LitElement.
ArcFitMixin
fits an element in another element using max-height
and max-width
, and optionally centers it in the window or another element. The element will only be sized and/or positioned if it has not already been sized and/or positioned by CSS.
CSS properties | Action |
---|---|
position set | Element is not centered horizontally or vertically |
top or bottom set | Element is not vertically centered |
left or right set | Element is not horizontally centered |
max-height set | Element respects max-height |
max-width set | Element respects max-width |
ArcFitMixin
can position an element into another element using verticalAlign
and horizontalAlign
. This will override the element's css position.
1<div class="container"> 2 <arc-fit-impl verticalalign="top" horizontalalign="auto"> 3 Positioned into the container 4 </arc-fit-impl> 5</div>
Use noOverlap
to position the element around another element without overlapping it.
1<div class="container"> 2 <arc-fit-impl nooverlap verticalalign="auto" horizontalalign="auto"> 3 Positioned around the container 4 </arc-fit-impl> 5</div>
Use horizontalOffset, verticalOffset
to offset the element from its
positionTarget
; ArcFitMixin
will collapse these in order to
keep the element within fitInto
boundaries, while preserving the element's
CSS margin values.
1<div class="container"> 2 <arc-fit-impl verticalalign="top" verticaloffset="20"> 3 With vertical offset 4 </arc-fit-impl> 5</div>
The following attributes are supported for compatibility with older and Polymer elements but eventually will be removed and replaced wit the corresponding new attribute.
sizing-target
> sizingtarget
fit-into
> fitinto
no-overlap
> nooverlap
position-target
> positiontarget
horizontal-align
> horizontalalign
vertical-align
> verticalalign
dynamic-align
> dynamicalign
horizontal-offset
> horizontaloffset
vertical-offset
> verticaloffset
auto-fit-on-attach
> autofitonattach
1npm i @advanced-rest-client/arc-fit-mixin
1import { LitElement } from 'lit-element'; 2import { ArcFitMixin } from '@advanced-rest-client/arc-fit-mixin'; 3 4class ArcFitImpl extends ArcFitMixin(LitElement) { 5 static get properties() { 6 return { 7 myProp: { type: Object, attribute: 'my-prop' }, 8 }; 9 } 10}
1npm run test
1npm run test:sl
1npm start
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 1
Details
Reason
project is archived
Details
Reason
Found 1/25 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
27 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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