Skip to content

Commit

Permalink
Add translucent badge option
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisreimann committed Feb 7, 2024
1 parent 50fd6ef commit 186e218
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 10 deletions.
38 changes: 38 additions & 0 deletions src/bootstrap/_customizations.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,44 @@ ul:not([class]) li {
padding: 1rem;
}

/* Badges */
.badge-translucent {
--btcpay-bg-opacity: .5;
}
.badge-translucent.text-bg-primary {
color: var(--btcpay-primary-accent);
}
.badge-translucent.text-bg-secondary {
color: var(--btcpay-secondary-accent);
}
.badge-translucent.text-bg-success {
color: var(--btcpay-success-accent);
}
.badge-translucent.text-bg-info {
color: var(--btcpay-info-accent);
}
.badge-translucent.text-bg-warning {
color: var(--btcpay-warning-accent);
}
.badge-translucent.text-bg-danger {
color: var(--btcpay-danger-accent);
}
.badge-translucent.text-bg-light {
color: var(--btcpay-dark-accent);
}
.badge-translucent.text-bg-dark {
color: var(--btcpay-light-accent);
}
.badge-translucent.text-bg-body {
color: var(--btcpay-body-accent);
}
.badge-translucent.text-bg-white {
color: var(--btcpay-black);
}
.badge-translucent.text-bg-black {
color: var(--btcpay-white);
}

/* Button */
.btn-outline-secondary {
--btcpay-btn-color: var(--btcpay-secondary-text);
Expand Down
26 changes: 18 additions & 8 deletions src/components/bootstrap/variants/badges.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,23 @@
</div>

<div class="bd-example">
<span class="badge rounded-pill text-bg-primary">Primary</span>
<span class="badge rounded-pill text-bg-secondary">Secondary</span>
<span class="badge rounded-pill text-bg-success">Success</span>
<span class="badge rounded-pill text-bg-danger">Danger</span>
<span class="badge rounded-pill text-bg-warning">Warning</span>
<span class="badge rounded-pill text-bg-info">Info</span>
<span class="badge rounded-pill text-bg-light">Light</span>
<span class="badge rounded-pill text-bg-dark">Dark</span>
</div>

<span class="badge rounded-pill bg-primary">Primary</span>
<span class="badge rounded-pill bg-secondary">Secondary</span>
<span class="badge rounded-pill bg-success">Success</span>
<span class="badge rounded-pill bg-danger">Danger</span>
<span class="badge rounded-pill bg-warning">Warning</span>
<span class="badge rounded-pill bg-info">Info</span>
<span class="badge rounded-pill bg-light">Light</span>
<span class="badge rounded-pill bg-dark">Dark</span>
<div class="bd-example">
<span class="badge badge-translucent rounded-pill text-bg-primary">Primary</span>
<span class="badge badge-translucent rounded-pill text-bg-secondary">Secondary</span>
<span class="badge badge-translucent rounded-pill text-bg-success">Success</span>
<span class="badge badge-translucent rounded-pill text-bg-danger">Danger</span>
<span class="badge badge-translucent rounded-pill text-bg-warning">Warning</span>
<span class="badge badge-translucent rounded-pill text-bg-info">Info</span>
<span class="badge badge-translucent rounded-pill text-bg-light">Light</span>
<span class="badge badge-translucent rounded-pill text-bg-dark">Dark</span>
</div>
38 changes: 38 additions & 0 deletions src/static/styles/btcpayserver-bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -12314,6 +12314,44 @@ ul:not([class]) li {
padding: 1rem;
}

/* Badges */
.badge-translucent {
--btcpay-bg-opacity: .5;
}
.badge-translucent.text-bg-primary {
color: var(--btcpay-primary-accent);
}
.badge-translucent.text-bg-secondary {
color: var(--btcpay-secondary-accent);
}
.badge-translucent.text-bg-success {
color: var(--btcpay-success-accent);
}
.badge-translucent.text-bg-info {
color: var(--btcpay-info-accent);
}
.badge-translucent.text-bg-warning {
color: var(--btcpay-warning-accent);
}
.badge-translucent.text-bg-danger {
color: var(--btcpay-danger-accent);
}
.badge-translucent.text-bg-light {
color: var(--btcpay-dark-accent);
}
.badge-translucent.text-bg-dark {
color: var(--btcpay-light-accent);
}
.badge-translucent.text-bg-body {
color: var(--btcpay-body-accent);
}
.badge-translucent.text-bg-white {
color: var(--btcpay-black);
}
.badge-translucent.text-bg-black {
color: var(--btcpay-white);
}

/* Button */
.btn-outline-secondary {
--btcpay-btn-color: var(--btcpay-secondary-text);
Expand Down
4 changes: 2 additions & 2 deletions src/styles/variables/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
--btcpay-pre-bg: var(--btcpay-neutral-900);

--btcpay-primary: var(--btcpay-brand-primary);
--btcpay-primary-accent: var(--btcpay-brand-tertiary);
--btcpay-primary-accent: var(--btcpay-primary-700);
--btcpay-primary-text: var(--btcpay-white);
--btcpay-primary-text-hover: var(--btcpay-white);
--btcpay-primary-text-active: var(--btcpay-white);
Expand All @@ -112,7 +112,7 @@
--btcpay-primary-rgb: 81, 177, 62;

--btcpay-secondary: var(--btcpay-white);
--btcpay-secondary-accent: var(--btcpay-secondary);
--btcpay-secondary-accent: var(--btcpay-neutral-700);
--btcpay-secondary-text: var(--btcpay-primary);
--btcpay-secondary-text-hover: var(--btcpay-primary);
--btcpay-secondary-text-active: var(--btcpay-brand-dark);
Expand Down

0 comments on commit 186e218

Please sign in to comment.