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@pedanticlabs/minimal-uiapp-adminareeba-ui-pubkanban-reactkdpa-components2kdpa-componentskeepa-kitherein-ui-kithadas-material-kit-reacthwebmantine-testmaterial-dashboard-2-reactkimi-theme@wings-dev/components@tverse/ui@useloops/design-system@test88282/buttonadac-ui-componentsalim-ui-kitarvest-mv@googleforcreators/dashboard@googleforcreators/story-editor@1kit/ui@grupo-brik/colpass-components@grupo-brik/propio-components@agribank/baran-playground@creaditor/form-builder-web-component@alicsystems/ui.components@columbia-libraries/mirador@aldrtech/uimantis-react-tsjvsilvawtecminimal-kittemplate-platformhadas-cb-chatspecter-ui-kit@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@eureka-ds/theme@lapilli-ui/styles@lendup_ir/utils@nakamura196/mirador@nazmul_mpower/dashboardvisualization@moladin/nextjs-mui@mongez/dash-rabbit@jvsilvawtec/def-react@kikisoftware/uikit@react-form-builder/designer@pretzi/mantine@salerator.net/components@pijma/helper-rtl@pigment-css/react@shu0725/testmui-reusemy-unique-shared-componentsmiradormirador-knaw-huc-mui5mirador-videopedilo-landingpazar-uikitpanel-sharedpaydece-app-widgetpaydece-app-widget-reactpaydece-test
2.1.1

4 years ago

2.1.0

4 years ago

2.0.2

5 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

6 years ago