Skip to content

Commit fde55e6

Browse files
author
Dimitri Kopriwa
committed
fix(button): using background instead of background for linear-gradient used within buttons
1 parent 8e58fb9 commit fde55e6

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@bootstrap-styled/css-mixins",
33
"version": "2.0.1",
44
"description": "Bootstrap v4 css-in-js mixins for Bootstrap Styled.",
5-
"main": "lib/index.js",
5+
"main": "lib/index.js",
66
"jsnext:main": "dist/@bootstrap-styled/css-mixins.es.js",
77
"module": "dist/@bootstrap-styled/css-mixins.es.js",
88
"homepage": "https://bootstrap-styled.github.io/css-mixins",

src/buttons.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { borderRadius } from './border-radius';
33
import { hover, hoverFocus } from './hover';
44
import { boxShadow } from './box-shadow';
55
import { transition } from './transition';
6-
import { ifThen, ifElse } from './conditional';
6+
import { ifElse } from './conditional';
77
import { linearGradientRe } from './regex';
88

99
export const defaultProps = {
@@ -104,8 +104,13 @@ export function buttonVariant(
104104
&.active,
105105
.show > &.dropdown-toggle {
106106
color: ${buttonColor};
107-
${ifThen(activeBackground.includes('linear-gradient'), 'background-image: none;')}
108-
background-color: ${activeBackground};
107+
${ifElse(activeBackground.includes('linear-gradient'), `
108+
background: ${activeBackground};
109+
`, `
110+
background-color: ${activeBackground};
111+
background-image: none;
112+
`)}
113+
109114
border-color: ${activeBorder};
110115
${boxShadow(enableShadows, btnActiveBoxShadow)}
111116
}

0 commit comments

Comments
 (0)