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-chardwareapp-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@grupo-brik/colpass-components@grupo-brik/propio-componentsmantis-react-tsjvsilvawtecminimal-kittemplate-platformhadas-cb-chatspecter-ui-kit@backlight-dev/cent-undress-o9ffc.bricks-l6ngliw7@eureka-ds/theme@lapilli-ui/styles@lendup_ir/utils@jvsilvawtec/def-react@pijma/helper-rtl@shu0725/testmui-reusemy-unique-shared-componentsmiradormirador-knaw-huc-mui5mirador-videopedilo-landingpazar-uikitpanel-sharedpaydece-app-widgetpaydece-app-widget-reactpaydece-testsalerator-componentssamin-form-renderreact-hook-form-genreact-gardennova-kitnpm-platform-test-durulnpm-platform-test-durul1platform-demoplatform-npmplatform-npm-landplatform.templateradman-kitred-quick-templatequbryx-react-componentreact-raikasmarthphone_uisoft-ui-dashboard-pro-reactsoft-ui-dashboard-reactsoft-ui-latestsidanau-cr3m4-templatedaliryauthgoals-goola@nucleoidai/platform@novin-dev/formalite@onzag/itemize@orbis-systems/orbis-react-toolkit@geourjoa/mirador-r18@eureka-ui/theme@hilma/forms
2.1.1

4 years ago

2.1.0

5 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