Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@material/rtl
Advanced tools
UIs for languages that are read from right-to-left (RTL), such as Arabic and Hebrew, should be mirrored to ensure content is easy to understand.
npm install @material/rtl
rtl
is the most flexible mixin, because it can work with multiple CSS properties. All other RTL mixins logic could be engineered by only using rtl
, but we provide these mixins for convenience.
Both reflexive-property
and reflexive-box
work with one base box-model property, e.g. margin, border, padding. But reflexive-property
is more flexible because it accepts different left and right values. reflexive-box
assumes the left and right values are the same, and therefore that the box-model is symmetrical.
reflexive-position
is the least flexible mixin. It only works with one horizontal position property, "left" or "right". It also assumes the left and right values are the same.
Mixin | Description |
---|---|
rtl($root-selector) | Creates a rule that is applied when the root element is within an RTL context |
reflexive-box($base-property, $default-direction, $value, $root-selector) | Applies the value to the #{$base-property}-#{$default-direction} property in a LTR context, and flips the direction in an RTL context. This mixin zeros out the original value in an RTL context. |
reflexive-property($base-property, $left-value, $right-value, $root-selector) | Emits rules that assign #{$base-property} -left to #{left-value} and #{base-property} -right to #{right-value} in a LTR context, and vice versa in a RTL context. Basically it flips values between a LTR and RTL context. |
reflexive-position($position-property, $value, $root-selector) | Applies the value to the specified position in a LTR context, and flips the direction in an RTL context. $position-property is a horizontal position, either "left" or "right". |
reflexive($left-property, $left-value, $right-property, $right-value, $root-selector) | Applies the pair of property values to the specified position in a LTR context, and flips the direction in an RTL context. |
A note about [dir="rtl"]: rtl($root-selector)
checks for [dir="rtl"]
on the ancestor element. This works in most cases, it will sometimes lead to false negatives for more complex layouts, e.g.
<html dir="rtl">
<!-- ... -->
<div dir="ltr">
<div class="mdc-foo">Styled incorrectly as RTL!</div>
</div>
</html>
Unfortunately, we've found that this is the best we can do for now. In the future, selectors such as :dir will help us mitigate this.
FAQs
Material Components for the web RTL Scss helpers
We found that @material/rtl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 open source maintainers 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.