Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Border doesn't get applied without border-solid #991

Closed
ta1bbty opened this issue Jan 5, 2023 · 2 comments
Closed

[BUG] - Border doesn't get applied without border-solid #991

ta1bbty opened this issue Jan 5, 2023 · 2 comments
Labels
馃悰 Type: Bug Something isn't working

Comments

@ta1bbty
Copy link

ta1bbty commented Jan 5, 2023

Hey @jrgarciadev 馃憢

Thanks a lot for this awesome library 馃コ

Describe the bug

Unless border is applied as border solid no border gets applied.

import React from "react";

export default function nextUI() {
    return (
            <div className="bg-white dark:bg-gray-800 dark:border-gray-700 p-100">
                <div className="border-t-4 border-t-indigo-500">
                    Thanks for the awesome NextUI 馃憢
                </div>
            </div>
    );
}

image

Changing the code to this :

import React from "react";

export default function nextUI() {
    return (
        <div className="bg-white dark:bg-gray-800 dark:border-gray-700 p-100">
            <div className="border-t-4 border-t-indigo-500 border-solid">
                Thanks for the awesome NextUI 馃憢
            </div>
        </div>
    );
}

image

To get what I want , i.e. indigo border only on top, I conjured a hack : ( removed borders from all other sides )

import React from "react";

export default function nextUI() {
    return (
        <div className="bg-white dark:bg-gray-800 dark:border-gray-700 p-100">
            <div className="border-t-4 border-t-indigo-500 border-solid border-l-0 border-r-0 border-b-0">
                Thanks for the awesome NextUI 馃憢
            </div>
        </div>
    );
}

image

I checked this too - #429

tailwind.config.js

module.exports = {
  important: true,
  // Active dark mode on class basis
  darkMode: "class",
  i18n: {
    locales: ["en-US"],
    defaultLocale: "en-US",
  },
  purge: {
    content: [
      "./pages/**/*.{js,ts,jsx,tsx}",
      "./components/**/*.{js,ts,jsx,tsx}",
    ],
  },
  theme: {
    extend: {},
  },
  variants: {
    extend: {
      border: ['focus'], // https://night-tailwindcss.vercel.app/docs/hover-focus-and-other-states#default-variants-reference
    },
  },
  plugins: [
    require('@tailwindcss/typography'),
    require('@tailwindcss/forms'),
    require('@tailwindcss/line-clamp'),
    require('@tailwindcss/aspect-ratio'),
  ],
};

globals.css

@tailwind components;
@tailwind utilities;

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

Create a new next JS application and add Next UI into it.

Dependencies :

"next": "13.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"@nextui-org/react": "^1.0.0-beta.11",
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/line-clamp": "^0.4.2",
"@tailwindcss/typography": "^0.5.8",

Dev Dependencies :

"devDependencies": {
    "@types/micro-cors": "^0.1.2",
    "@types/node": "^18.11.18",
    "autoprefixer": "^10.4.13",
    "postcss": "^8.4.20",
    "prettier": "^2.8.1",
    "prettier-plugin-tailwindcss": "^0.2.1",
    "prisma": "^4.8.0",
    "tailwindcss": "^3.2.4",
    "ts-node": "^10.9.1",
    "typescript": "^4.9.4"
  }

Expected behavior

Border should be applied only to top .

Screenshots or Videos

No response

Operating System Version

Mac OS

Browser

Chrome

@ta1bbty ta1bbty added the 馃悰 Type: Bug Something isn't working label Jan 5, 2023
@ta1bbty ta1bbty changed the title [BUG] - One side border doesn't work [BUG] - Border doesn't get applied without border-solid Jan 5, 2023
@ta1bbty
Copy link
Author

ta1bbty commented Jan 5, 2023

Here's the stackblitz sample project, with all the code files ( though for some reason this doesn't work ) : https://stackblitz.com/edit/nextjs-dw1wjh?file=pages/index.tsx

@jrgarciadev
Copy link
Member

Hey guys sorry for the delay, please upgrade to V2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃悰 Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants