2.1.1 • Published 3 years ago

stylis-plugin-rtl v2.1.1

Weekly downloads
17,772
License
MIT
Repository
github
Last release
3 years ago

stylis-plugin-rtl

Stylis RTL plugin based on CSSJanus

NOTE! Use v1 of this plugin for styled-components v5, NOT v2 (v2 is for libraries that have upgraded to stylis v4, which s-c has not yet. At the moment only emotion 11 is updated.)

Installation

v1

yarn add stylis-plugin-rtl@^1

v2

yarn add stylis-plugin-rtl stylis

Usage with styled-components v5+

import styled, { StyleSheetManager } from "styled-components";
import rtlPlugin from "stylis-plugin-rtl";

const Box = styled.div`
  padding-left: 10px;
`;

function MakeItRTL() {
  return (
    <StyleSheetManager stylisPlugins={[rtlPlugin]}>
      <Box>My padding will be on the right!</Box>
    </StyleSheetManager>
  );
}

NOTE: Preventing flipping

Because minification removes all comments from your CSS before it passes to <StyleSheetManager>, /* @noflip */ comment won't work. You will have to either:

  • add an exclamation mark at the beginning of the comment, like this /*! @noflip */, to prevent it from being removed
  • disable minification entirely by setting minify to false in .babelrc (see styled-components documentation).

This is a fork of stylis-rtl for use with styled-components v5+

@hilma/formsscandinaviavigoworks.componentsstgandalf@cloudhub-ux/core@infinitebrahmanuniverse/nolb-styli@spely-co/nextjstry-inda2@everything-registry/sub-chunk-2843materio-mui-react-nextjs-admin-templatecard-statisticsnoot-cosmeticsra-mirador@ascendware/mxrafsun-core-services@novin/salerator-components@moladin/nextjs-mui@mongez/dash-rabbit@kikisoftware/uikit@lapilli-ui/styles@lendup_ir/utils@mephistowa/cra-template-typescript-redux-red-quick@mbaluev/t1v3-shop-ssr-core@nazmul_mpower/dashboardvisualization@skodaflow/web-library@stylefusion/react@tverse/ui@onzag/itemize@pedanticlabs/minimal-ui@pretzi/mantine@wings-dev/components@novin-dev/formalite@orbis-systems/orbis-react-toolkit@react-form-builder/designer@salerator.net/components@pigment-css/react@pijma/helper-rtlplatform-demo@test88282/buttonfinno-uifinal-radman-kitfinal-radman-kit-maryfinal-radman-kittalim-ui-kitpazar-uikitgoals-goola@backlight-dev/sillyleo.bricks-lccvkr2p@backlight-dev/soap-distribute-dux20.rjid@backlight-dev/hdn-test.hdn-bricks@backlight-dev/various-trouble-hjmth.bricks-l6ngliw7-fork-lgq24azv@backlight-dev/human-apple-pfrt9.bricks-l0gqrlz3@backlight-dev/icky-boys-h9rid.bricks-lglce3zu@backlight-dev/various-trouble-hjmth.bricks-lgq27cpj@backlight-dev/veil-steal-hej64.bricks-l7gtkkiyradman-kitpanel-sharedform007@aldrtech/uifrontend-core-sabrosogal-example-webpack-reactavan-beatpedilo-landingplatform-npmplatform.templatecoderbase-ecommerce-admin-panelcomfort-react@columbia-libraries/miradorcloudhub-componentscloudhub-mincloudhubuicloudhubui-min@backlight-dev/another-one.bricks-2htydw13pkxg0gsvc@backlight-dev/cent-undress-o9ffc.bricks-l6ngliw7@backlight-dev/setbrain.ink-forego-vnavb.bricks-l5gkcnmk@backlight-dev/power-drive-tgm7r.bricks-lo057i5n@backlight-dev/rapid-sweater-1n8dt.bricks-l3yzvl9gherein-ui-kitcheckout-loadzcustombutondash@do-exam/publishable@creaditor/form-builder-web-componentideep-design-system-2berry-free-react-material-admin-templateberry-material-react-freequbryx-react-component@ceed/uihadas-cb-chatcen-muireact-gardencra-template-typescript-redux-redquickcrm-webuired-quick-templatesamin-form-renderdebugducksalerator-componentscra-template-red-quickdashboardvisualizationmantine-testsidanau-cr3m4-templatesoft-ui-dashboard-react
2.1.1

3 years ago

2.1.0

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0-test.1

4 years ago

2.0.0-test.2

4 years ago

2.0.0-test.3

4 years ago

2.0.0-test.0

4 years ago

2.0.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago