Skip to content

fix: made tailwind classes compatible with all versions of consumers …#34

Open
rahul-vyas-dev wants to merge 4 commits into
AOSSIE-Org:mainfrom
rahul-vyas-dev:fix/tailwind-and-UI
Open

fix: made tailwind classes compatible with all versions of consumers …#34
rahul-vyas-dev wants to merge 4 commits into
AOSSIE-Org:mainfrom
rahul-vyas-dev:fix/tailwind-and-UI

Conversation

@rahul-vyas-dev

@rahul-vyas-dev rahul-vyas-dev commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Screenshots/Recordings:

Before: -
image
image

After: -
image

image

Summary

This PR simplifies the package build process by removing the Tailwind CSS PostCSS/Rollup integration and introduces compatibility for both Tailwind CSS v3 and Tailwind CSS v4+ consumers.

Changes

Build System

  • Removed the Tailwind CSS build dependency on Rollup/PostCSS.
  • Added a dedicated Tailwind CLI build step to generate the compiled stylesheet.
{
  "scripts": {
    "build:css": "npx @tailwindcss/cli -i ./src/styles/style.css -o ./dist/style.css --minify",
    "build:js": "rollup -c",
    "build": "npm run build:css && npm run build:js",
    "dev": "rollup -c -w",
    "prepublishOnly": "npm run build"
  }
}
  • Added @tailwindcss/cli as a development dependency.
  • Removed the previous Tailwind/PostCSS integration from the build pipeline.

Tailwind CSS Compatibility

This package now supports both Tailwind CSS v3 and Tailwind CSS v4+, accounting for the breaking changes introduced in Tailwind v4.

Tailwind CSS v4+

Consumers should import the precompiled stylesheet:

import "support-us-button/style.css";

Since Tailwind v4 supports importing compiled CSS directly, the package's generated stylesheet from dist/style.css is used without requiring consumers to compile the package's Tailwind classes.

Tailwind CSS v3 (and earlier)

Consumers should not import the compiled stylesheet.

Instead, they should include the package in their tailwind.config.js content array:

module.exports = {
  content: [
    "./src/**/*.{js,ts,jsx,tsx}",
    "./node_modules/support-us-button/dist/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
};

In this case, the consumer's own Tailwind v3 compiler detects and compiles the utility classes from the package, ensuring full compatibility with Tailwind v3.

Why?

Tailwind CSS v4 introduced breaking changes that make a single distribution strategy incompatible with both versions.

This PR provides the appropriate integration path for each version:

  • Tailwind v4+: Use the package's precompiled CSS (dist/style.css).
  • Tailwind v3 and earlier: Let the consumer's Tailwind compiler generate the required CSS from the package source.

This approach allows the package to work seamlessly across both Tailwind versions while keeping the build process simpler and eliminating the previous Rollup/PostCSS dependency for Tailwind CSS.

  • Added className and border props to SupportUsButton for better customization.
  • Updated the rendering of border lines to use values from the border prop.
  • Refactored the component to improve readability and maintainability.

Checklist

  • My code follows the project's code style and conventions
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contributing Guidelines

⚠️ AI Notice - Important!

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.

Summary by CodeRabbit

  • New Features

    • Added className support for custom styling.
    • Added configurable page borders with adjustable coordinates.
    • Exported the border configuration type for integrations.
    • Improved responsive layout and sponsor presentation.
  • Documentation

    • Expanded Tailwind CSS setup guidance for versions 3 and 4+.
    • Documented the new Logo, className, and border properties.
  • Build Improvements

    • Added dedicated CSS compilation and minification to the build process.

…and some UI fixes with new features.

- Added `className` and `border` props to SupportUsButton for better customization.
- Updated the rendering of border lines to use values from the `border` prop.
- Refactored the component to improve readability and maintainability.
- Removed postcss plugin from Rollup config as Tailwind CSS is now built separately.
- Introduced new build scripts for CSS and JS in package.json.
- Updated package.json to include @tailwindcss/cli as a dependency.
- Cleaned up style.css by removing unnecessary imports and added source references.
@github-actions github-actions Bot added no-issue-linked PR is not linked to any issue configuration Configuration file changes dependencies Dependency file changes documentation Changes to documentation files frontend Changes to frontend code javascript JavaScript/TypeScript code changes size/XL Extra large PR (>500 lines changed) repeat-contributor PR from an external contributor who already had PRs merged pending-coderabbit-review labels Jul 18, 2026
@socket-security

socket-security Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​tailwindcss/​cli@​4.3.31001007798100

View full report

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@rahul-vyas-dev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: fac6789a-5bcf-468d-8682-b4660e8d784e

📥 Commits

Reviewing files that changed from the base of the PR and between e9305dc and c22e6d4.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • VERSION
  • package.json

Walkthrough

SupportUsButton now accepts className and configurable border coordinates, with updated public types and SVG rendering. Tailwind CSS compilation moves to the Tailwind CLI, while README usage and API documentation are expanded.

Changes

SupportUsButton customization and build pipeline

Layer / File(s) Summary
SupportUsButton props and border rendering
src/types/index.ts, src/index.ts, src/components/SupportUsButton.tsx
Adds the borderAroundPage type, exports it publicly, applies className, renders configurable border coordinates, and updates SVG and responsive layout attributes.
Tailwind CLI build integration
src/styles/style.css, package.json, rollup.config.js, src/index.ts
Adds Tailwind source directives, separates CSS and JavaScript build scripts, adds the Tailwind CLI, and removes Rollup PostCSS processing.
Usage and API documentation
README.md
Documents Tailwind v4 and earlier setup paths and adds API details for Logo, className, and border.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Consumer
  participant SupportUsButton
  participant PageBorderSVG
  Consumer->>SupportUsButton: Pass className and border coordinates
  SupportUsButton->>PageBorderSVG: Render lines using border fields
  PageBorderSVG-->>Consumer: Display customized page border
Loading

Possibly related PRs

Suggested labels: Typescript Lang

Poem

I’m a rabbit with borders to draw,
And Tailwind builds CSS without a flaw.
New classes hop in,
SVG lines begin—
Documentation earns one more paw!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main Tailwind compatibility theme, though it omits the build and component prop updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Around line 57-59: Update the package.json dev script to watch both Tailwind
CSS through build:css and JavaScript through the existing Rollup watcher, using
the project's available parallel execution approach or adding the necessary
concurrently setup. Preserve the existing build:css and build:js scripts while
ensuring a single dev command runs both watchers.

In `@README.md`:
- Around line 338-345: Correct the README documentation for the border props:
replace the inaccurate call-to-action description with the proper border-related
description, and change the duplicated BottomX1 table entry to BottomX2 while
preserving its type, required status, and description.

In `@src/components/SupportUsButton.tsx`:
- Line 351: Fix the invalid Tailwind responsive class by replacing
md-justify-between with md:justify-between at src/components/SupportUsButton.tsx
lines 351-351 and 372-374.
- Around line 259-261: Update the className expression in the SupportUsButton
component to use the valid `md:container` class and replace the logical-and
interpolation with a ternary that returns the responsive classes when
`projectInformation?.name` exists and an empty string otherwise, preventing
`"undefined"` from entering the class string.
- Around line 373-374: The sponsors list in the sponsors?.map rendering should
use sponsor.name as the React key instead of the array index. Update the key on
the mapped sponsor element, preserving the existing layout and rendering
behavior.
- Around line 35-51: Mark the SupportUsButton component as a client component by
adding the Next.js client directive at the top of the file before imports,
preserving its existing onClick and window.open behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c10a8cfb-aed1-4561-ac29-b004e61413d9

📥 Commits

Reviewing files that changed from the base of the PR and between cf16cea and e9305dc.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • README.md
  • package.json
  • rollup.config.js
  • src/components/SupportUsButton.tsx
  • src/index.ts
  • src/styles/style.css
  • src/types/index.ts
💤 Files with no reviewable changes (1)
  • rollup.config.js

Comment thread package.json
Comment thread README.md
Comment thread src/components/SupportUsButton.tsx
Comment thread src/components/SupportUsButton.tsx
Comment thread src/components/SupportUsButton.tsx
Comment thread src/components/SupportUsButton.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

configuration Configuration file changes dependencies Dependency file changes documentation Changes to documentation files frontend Changes to frontend code javascript JavaScript/TypeScript code changes no-issue-linked PR is not linked to any issue pending-coderabbit-review repeat-contributor PR from an external contributor who already had PRs merged size/XL Extra large PR (>500 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant