Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-inline-styler-processor-rtl
Advanced tools
Readme
(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.
The npm package react-inline-styler-processor-rtl receives a total of 1 weekly downloads. As such, react-inline-styler-processor-rtl popularity was classified as not popular.
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.