Skip to content

Commit

Permalink
Merge pull request #1582 from DissNik/3.x
Browse files Browse the repository at this point in the history
classes for color text
  • Loading branch information
lee-to authored Mar 3, 2025
2 parents ed1ac3f + d4c4d7b commit efd58b4
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
35 changes: 35 additions & 0 deletions src/UI/resources/css/components/colors.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
/* text colors */
.text-success {
@apply text-success-text;
}
.text-error {
@apply text-success-text;
}
.text-warning {
@apply text-warning-text;
}
.text-info {
@apply text-info-text;
}
.text-purple {
@apply text-purple-500;
}
.text-pink {
@apply text-pink-500;
}
.text-blue {
@apply text-blue-500;
}
.text-green {
@apply text-green-500;
}
.text-yellow {
@apply text-yellow-500;
}
.text-red {
@apply text-red-500;
}
.text-gray {
@apply text-gray-500;
}

/* Background colors */
.bgc-primary {
@apply !bg-primary text-white;
Expand Down
2 changes: 1 addition & 1 deletion src/UI/resources/views/components/icon.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
'color' => '',
])
<div {{ $attributes->class([
'text-current',
'w-' . ($size ?? 5),
'h-' . ($size ?? 5),
'text-current' => empty($color),
"text-$color" => !empty($color),
]) }}>
@if($slot?->isNotEmpty())
Expand Down
5 changes: 0 additions & 5 deletions src/UI/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ const vendorSafeList = [
pattern: /col-span-\d/,
variants: isDevelopment() ? ['xl'] : ['xs', 'sm', 'md', 'lg', 'xl', '2xl'],
},
{
// usage: icons
pattern: /text-(pink|purple)/,
variants: isDevelopment() ? [] : ['xs', 'sm', 'md', 'lg', 'xl', '2xl'],
},
{
// usage: flex align items
pattern: /items-(start|end|center|baseline|stretch)/,
Expand Down

0 comments on commit efd58b4

Please sign in to comment.