Git Product home page Git Product logo

tailwind-direction's People

Contributors

sa3dany avatar yassinebridi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tailwind-direction's Issues

PurgeCSS config

Is there any recommendation on purge configuration?
Currently, when running in production mode, tailwind is purging some classes injected by this lib,
such as:

[dir=rtl] .right-0 {
    left: 0
}

The above is only found in dev mode without purging.

A temporary fix for me was to add:

safelist: {
    greedy: [/(right-0)|(left-0)/]
}

Overriding Direction for specific elements

Is there a way to override an element to not change direction?
For example, let's say I have a button that scrolls to the top of the page on click, and I do not want it to have right-0 change to left-0 by the css injected from this plugin... Is there a way? I tried to override the parent div with a dir="ltr" to force it but that doesn't work obviously.

Thanks for sharing this lib!

Overriding html tag dir attribute

I had multiple use-cases when I needed to override the direction set inside the html tag dir attribute. For example, when I want the whole document to be RTL, but one section to ignore the rtl rules injected and display as LTR.

Setting a dir="ltr" on the div that wants the override of course wouldn't work, but I can't think of a workaround that works with this lib... Any genius ideas :) ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.