File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 4
4
* Licensed under MIT (https://coreui.io/license)
5
5
* --------------------------------------------------------------------------
6
6
*/
7
- import getCssCustomProperties from './get-css-custom-properties'
8
-
9
- const minIEVersion = 10
10
- const isIE1x = ( ) => Boolean ( document . documentMode ) && document . documentMode >= minIEVersion
11
- const isCustomProperty = ( property ) => property . match ( / ^ - - .* / i)
7
+ import getStyle from './get-style'
12
8
13
9
const getColor = ( rawProperty , element = document . body ) => {
14
10
const property = `--${ rawProperty } `
15
- let style
16
- if ( isCustomProperty ( property ) && isIE1x ( ) ) {
17
- const cssCustomProperties = getCssCustomProperties ( )
18
- style = cssCustomProperties [ property ]
19
- } else {
20
- style = window . getComputedStyle ( element , null ) . getPropertyValue ( property ) . replace ( / ^ \s / , '' )
21
- }
11
+ const style = getStyle ( property , element )
22
12
return style ? style : rawProperty
23
13
}
24
14
You can’t perform that action at this time.
0 commit comments