
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
ember-resize-text
Advanced tools
ember addon that makes use of ember-text-measurer to efficiently resize the font of a single line of text to make it fit within its bounds
ember addon that makes use of ember-text-measurer to efficiently resize the font of a single line of text to make it fit within its bounds.
ember install ember-resize-text
checkout out the demo page
Using ember-resize-text is easy. Just wrap your text within resize-text
block-style.
{{#resize-text min-font=12 max-font=20}}
Please resize me!
{{/resize-text}}
This addon automatically registers event listeners on the windows resize event to make sure text still fits after the window is resized. If you want the text to increase its font size whenever the window is resized, make sure to add the appropriate styling to the add-ons resize-text
css class. For instance consider this markup:
<nav>
<span>first</span>
{{#resize-text}}
second
{{/resize-text}}
</nav>
and the following css:
nav {
width: 100%;
display: flex
}
.resize-text {
flex-grow: 1; /* allow the resize-text elements to increase its size */
}
The size of the font will not be increased if the element with resize-text
class will not be able to increase its width in dependency to the parent's width. This is not built into the addon as this depends on the context in which the addon is used.
Please open issues to discuss further improvement of this add on. Corresponding PRs are very welcome!
FAQs
ember addon that makes use of ember-text-measurer to efficiently resize the font of a single line of text to make it fit
The npm package ember-resize-text receives a total of 154 weekly downloads. As such, ember-resize-text popularity was classified as not popular.
We found that ember-resize-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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.