Giter Club home page Giter Club logo

tailwind-shift's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tailwind-shift's Issues

Multiline conditional Vue classes ignored

Conditional classes seem to be ignored if they're multi-line. When they're on a single line they appear to be replaced.

<template>
    <component
        class="group cursor-pointer bg-grey-500"
        :class="{
                'border-l border-grey-light': !isResponse,
                'ml-8 md:ml-16 border-l border-teal': isResponse
                }"
    >

Variants keys not replaced

The variants config object is reconstructed, but the keys still use the old name, e.g.

    variants: {
        textStyle: ['responsive', 'hover', 'focus', 'group-hover'],
    }

Expected:

    variants: {
        fontStyle: ['responsive', 'hover', 'focus', 'group-hover'],
    }

Shift regex too greedy

Hi there,

I noticed while running v1.0.3 that things were being changed that had nothing to do with Tailwind. Some of these files had previously been run through a shift but some had not, so I don't think that is a factor.

Here are some examples:

SVG's xmlns (or any URL that has a colon):
Screen Shot 2019-04-22 at 1 05 07 PM

Laravel facade:
Screen Shot 2019-04-22 at 1 05 25 PM

Vue component keys (name, props, components, filters, etc.):
Screen Shot 2019-04-22 at 1 05 39 PM

Random words with a colon right after:
Screen Shot 2019-04-22 at 1 06 19 PM

If there was a space after the colon it was leaving the space, which I found odd. It should probably take out the space as well.

I'm also seeing some of my custom components being changed if I used a color in their name. For example, button-orange would be changed to button-orange-500.

Grey vs gray

From the upgrade docs:
"For greys (note that grey has changed to gray 🇺🇸):"

The config file updates to gray but the string replacer replaces text-grey with text-grey-500.

Haven't tried to run my converted html yet, so maybe I'm just missing something?

Colors being removed from bg- border- text-

Uses of color in border, text and bg are being replaced by the type, removing the color.

tailwind-shift '<div class="border-green-darker">'
Converted Code: <div class="border-border-800">

expected:
<div class="border-green-800">

same is true for bg-, text-

Doesn't work on SCSS/SASS

Possibly also won't work for LESS or other pre-compiled stylesheets.

The command I ran was: tailwind-shift resources/ --recursive=true --replace=true --extensions="vue,php,scss"

An example snippet of code in my _common.scss file (I have several SASS files for different parts of the app, but _common.scss shares common styles and components that are then @imported into the other SASS files):

@responsive {
    .button-blue {
        @apply .bg-blue .text-white;
        &:hover {
            @apply .bg-blue-dark .text-white;
        }

        &.disabled,
        &:disabled,
        &[disabled] {
            @apply .bg-blue-lightest .text-blue-dark;
        }
    }
}

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.