![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
ngx-fit-text
Advanced tools
Angular FitText, an Angular implementation of @patrickmarabeas/ng-FitText.js
An Angular implementation of @patrickmarabeas/ng-FitText.js
From the original description (slightly edited for clarity):
Ngx-FitText makes font-sizes flexible. Use this Angular directive in your fluid or responsive layout to achieve scalable headlines that fill the width of a parent element.
This directive has been tested with Angular 5 and Angular CLI. Let me know if you make it work with different versions and tools.
Install into your Angular CLI project root folder.
npm install ngx-fittext -S
AppModule
Help wanted! - At the moment of writing I'm still new to the world of Angular libraries, so I'm in the process of figuring out how to let you avoid having to import the module at the root level instead of importing it just where you need it.
Let me know if you can help with this, and please feel free to open a PR.
// src/app/app.module.ts
...
import { NgxFitTextModule } from 'ngx-fit-text';
...
@NgModule({
...
imports: [
...
NgxFitTextModule.forRoot()
],
...
})
export class AppModule { }
Important! - The HTML element you apply the directive to, must have a parent element!
<header>
<h1 [ngxFitText]>Look at how I resize myself</h1>
</header>
Compression ratio (accepts float, default: 1
)
Set a overall compression ratio.
<header>
<h1 [ngxFitText]="0.9">
Look at how I resize myself
</h1>
</header>
Minimum / maximum font size (accepts px or 'inherit', default min: 0
, default max: Number.POSITIVE_INFINITY
)
<header>
<h1
[ngxFitText]
[ngxFitTextMin]="11"
[ngxFitTextMax]="18"
>
Look at how I resize myself between 11px and 18px
</h1>
</header>
Debounce resizing (accepts milliseconds, default: 100
)
i.e. for controlling how to debounce the window.resize
event
<header>
<h1
[ngxFitText]
[ngxFitTextDelay]="1000"
>
Look at how I resize myself after 1 second
</h1>
</header>
You'll need @gonzofish/angular-librarian.
Go ahead and install it, and make sure to follow the instructions about how to make it work in the command line.
It's also important to have a EditorConfig plugin installed and active in you editor / IDE, so that your code will follow the project's style on a base level.
Linting and prettifying tools will be added in the future.
cd ngx-fit-text
npm install
You can find all the info about how to run a Angular Librarian project in its documentation, but here's two handy commands:
ngl serve
- to run the project's examples into a Webpack DevServernpm test
- to run the unit tests before submitting a PRWe use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the ISC License - see the LICENSE.md file for details
FAQs
Angular FitText, an Angular implementation of @patrickmarabeas/ng-FitText.js
The npm package ngx-fit-text receives a total of 0 weekly downloads. As such, ngx-fit-text popularity was classified as not popular.
We found that ngx-fit-text 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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.