Skip to content

Commit

Permalink
feat:add gradient background support to buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
zanzebra committed Mar 5, 2022
1 parent 4bfcc82 commit 12b2655
Show file tree
Hide file tree
Showing 4 changed files with 191 additions and 2 deletions.
88 changes: 88 additions & 0 deletions css/cdb.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/cdb.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cdbootstrap",
"version": "1.2.0",
"version": "1.2.1",
"main": "js/cdb.js",
"repository": {
"type": "git",
Expand Down
101 changes: 101 additions & 0 deletions src/scss/components/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,105 @@
padding: 3px 6px;
font-size: 0.625rem;
}
&-gradient {
&-primary {
background-image: linear-gradient(
to right,
#60a5fa,
$primary-color,
#2563eb
);
border: none;
color: #fff;
&:hover {
color: #fff;
}
}
&-secondary {
background-image: linear-gradient(
to right,
#818cf8,
$secondary-color,
#4f46e5
);
border: none;
color: #fff;
&:hover {
color: #fff;
}
}
&-danger {
background-image: linear-gradient(
to right,
#f87171,
$danger-color,
#dc2626
);
border: none;
color: #fff;
&:hover {
color: #fff;
}
}
&-success {
background-image: linear-gradient(
to right,
#4ade80,
$success-color,
#16a34a
);
border: none;
color: #fff;
&:hover {
color: #fff;
}
}
&-warning {
background-image: linear-gradient(
to right,
#fde047,
$warning-color,
#facc15
);
border: none;
color: #fff;
&:hover {
color: #fff;
}
}
&-info {
background-image: linear-gradient(
to right,
#22d3ee,
$info-color,
#0891b2
);
border: none;
color: #fff;
&:hover {
color: #fff;
}
}
&-light {
background-image: linear-gradient(
to right,
$light-color,
#f4f4f4,
#f0f0f0
);
border: none;
color: #333;
&:hover {
color: #333;
}
}
&-dark {
background-image: linear-gradient(to right, #374151, #1f2937, #111827);
border: none;
color: #fff;
&:hover {
color: #fff;
}
}
}
}

0 comments on commit 12b2655

Please sign in to comment.