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

feat: added gradient border tailwind code #554

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/lib/packages/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,18 @@ export const actOnTailwindGenerator = (
)} text-transparent bg-clip-text`;
break;
case 'gradient-border':
codeToCopy = ``;
element = outputElement.style;
const content = window.getComputedStyle(outputElement, '::before');
Copy link
Owner

Choose a reason for hiding this comment

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

this caused an error because you aren't using it:
image


codeToCopy = `
<div class="relative">
<div class="before:absolute before:inset-0 before:p-6 before:mask before:mask-composite-before:border-box
before:mask-composite-xor before:exclude before:bg-[content.background] before:bg-clip-border-box
@if(content.borderRadius !== '0px') before:rounded-[content.borderRadius] @endif">
</div>
</div>
Comment on lines +409 to +414
Copy link
Owner

Choose a reason for hiding this comment

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

Using template engine syntax won't work, instead use a template literal
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals


`;
break;
case 'gradient-background':
codeToCopy = `${convertLinearGradientToTailwind(
Expand Down
Loading