2.1.1 • Published 4 years ago

stylis-plugin-rtl v2.1.1

Weekly downloads
17,772
License
MIT
Repository
github
Last release
4 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+

scandinaviavigoworks.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-componentsvuexy-nextjs-admin-templatewithub-mantinewondermove-web-componentwm-component-testwebstudio-apptechhype-dashboardspendanalyticsplatformstonex-uivs-design-systemvision-ui-chardware@do-exam/publishable@ds-form-builder/designer@creaditor/form-builder-web-component@columbia-libraries/mirador@pedanticlabs/minimal-uiapp-adminareeba-ui-pubkanban-reactkdpa-components2kdpa-componentskeepa-kitmantis-react-tsjvsilvawtecminimal-kittemplate-platformhadas-cb-chatspecter-ui-kit@aldrtech/ui@alicsystems/ui.components@backlight-dev/various-trouble-hjmth.bricks-l6ngliw7-fork-lgq24azv@backlight-dev/various-trouble-hjmth.bricks-lgq27cpj@backlight-dev/veil-steal-hej64.bricks-l7gtkkiy@backlight-dev/rapid-sweater-1n8dt.bricks-l3yzvl9g@backlight-dev/sillyleo.bricks-lccvkr2p@backlight-dev/soap-distribute-dux20.rjid@backlight-dev/setbrain.ink-forego-vnavb.bricks-l5gkcnmk@backlight-dev/power-drive-tgm7r.bricks-lo057i5n@backlight-dev/hdn-test.hdn-bricks@backlight-dev/human-apple-pfrt9.bricks-l0gqrlz3@backlight-dev/icky-boys-h9rid.bricks-lglce3zu@backlight-dev/another-one.bricks-2htydw13pkxg0gsvc@backlight-dev/cent-undress-o9ffc.bricks-l6ngliw7@ceed/ui@1kit/ui@datawheel/data-explorer@grupo-brik/colpass-components@grupo-brik/propio-components@hcl-software/enchanted-react-components@hilma/forms@fluentui/react-northstar-emotion-renderer@googleforcreators/dashboard@googleforcreators/story-editor@eureka-ds/theme@eureka-ui/theme@geourjoa/mirador-r18@lapilli-ui/styles@lendup_ir/utils@marbit/ui@nakamura196/mirador@nazmul_mpower/dashboardvisualization@elementor/ui@mephistowa/cra-template-typescript-redux-red-quick@moladin/nextjs-mui@mbaluev/t1v3-shop-ssr-core@mongez/dash-rabbit@jvsilvawtec/def-react@kikisoftware/uikit@react-form-builder/designer@pretzi/mantine@salerator.net/components@onzag/itemize@pijma/helper-rtl@pigment-css/react@nucleoidai/platform@novin-dev/formalite@orbis-systems/orbis-react-toolkit@shu0725/testmui-reusemy-unique-shared-componentsmiradormirador-knaw-huc-mui5mirador-videopedilo-landingpazar-uikitpanel-sharedpaydece-app-widget
2.1.1

4 years ago

2.1.0

4 years ago

2.0.2

4 years ago

2.0.1

5 years ago

2.0.0-test.1

5 years ago

2.0.0-test.2

5 years ago

2.0.0-test.3

5 years ago

2.0.0-test.0

5 years ago

2.0.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago