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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add per-side border classes #505

Merged
merged 1 commit into from
Aug 18, 2021
Merged

Conversation

ben-rogerson
Copy link
Owner

This PR adds the ability to specify border color and border width on a specific border direction:

import tw from "twin.macro";

// Colors
tw`border-t-gray-50`;
tw`border-b-red-500`;

// ↓ ↓ ↓ ↓ ↓ ↓

({
  "--tw-border-opacity": "1",
  "borderTopColor": "rgba(249, 250, 251, var(--tw-border-opacity))"
});
({
  "--tw-border-opacity": "1",
  "borderBottomColor": "rgba(239, 68, 68, var(--tw-border-opacity))"
});
import tw from "twin.macro";

// Widths
tw`border-t-4`;
tw`border-b-4`;

// ↓ ↓ ↓ ↓ ↓ ↓

({
  "borderTopWidth": "4px"
});
({
  "borderBottomWidth": "4px"
}); 

@ben-rogerson ben-rogerson mentioned this pull request Aug 10, 2021
13 tasks
@ben-rogerson ben-rogerson merged commit 28ad7ea into master Aug 18, 2021
@ben-rogerson ben-rogerson deleted the feature/border-side-classes branch August 18, 2021 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant