Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
react-inline-styler-processor-rtl
Advanced tools
(Right to left / left to right) dynamic inline styles processing.
RTL processor for React inline styler react-inline-styler
This processor adds new syntax for the inline styles mainly, "start" and "end" which are dynamically changed to left or right depending on the wanted app language direction, by specifing isRTL
in the ReactInlineStylerProvider
.
npm install react-inline-styler-processor-rtl
//App.js
import rtlProcessor from 'react-inline-styler-processor-rtl'
// or var rtlProcessor = require('react-inline-styler-processor-rtl')
const pipeline = [rtlProcessor];
const configs = {isRTL: true};
<ReactInlineStylerProvider configs={configs} pipeline={pipeline}>
</ReactInlineStylerProvider>
//styles.js
const styles = function() {
return {
rootStyle: {
float: 'start',
paddingStart: ...
}
}
}
localizing styles happens on the key of the attibute, or its value. in LTR configurations start is translated into "left" and "end" is translated into "right". in RTL, the other way around.
{
float: 'start',
float: 'end',
}
{
direction: 'start',
direction: 'end',
}
{
transformOrigin: 'start',
transformOrigin: 'end',
}
{
transform: translate
transform: skew
}
text-align
values' start
and end
are supported in all browers but not in IE11+ and Edge. Therefore, this transform was added.
{
textAlign: 'start'
textAlign: 'end'
}
{
marginStart: ...
marginEnd: ...
paddingStart: ...
paddingEnd: ...
}
{
start: ...
end: ...
}
{
borderStart: ...
borderStartWidth: ...
borderStartStyle: ...
borderStartColor: ...
borderEnd: ...
borderEndWidth: ...
borderEndStyle: ...
borderEndColor: ...
}
{
borderTopStartRadius: ...
borderTopEndRadius: ...
borderBottomStartRadius: ...
borderBottomEndRadius: ...
}
FAQs
React Inline Styler RTL Processors.
We found that react-inline-styler-processor-rtl 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.