fix: fix css variables not working on some components (#351)
This commit is contained in:
parent
1a6868ce0a
commit
af99607ab3
|
@ -47,7 +47,7 @@ function generateVariablesStyl(variables) {
|
|||
let stylContent = '/**\r\n Automatically generated when running script \'build:variables\'\r\n Do not edit or delete manually\r\n**/\r\n'
|
||||
|
||||
for (const variable in variables) {
|
||||
if (variables.hasOwnProperty(variable)) {
|
||||
if (variables.hasOwnProperty(variable) && variable !== 'support-for-ie') {
|
||||
stylContent += `${variable} = var(--${variable})\n`
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@ const isSpecial = process.env.BUILD_TYPE === 'special'
|
|||
module.exports = function useMixin(style) {
|
||||
if (process.env.BUILD_TYPE === 'variables') {
|
||||
return style
|
||||
.import(path.join(__dirname, '../components/_style/mixin/theme.variable.styl'))
|
||||
.import(path.join(__dirname, '../components/_style/mixin/theme.components.styl'))
|
||||
.import(path.join(__dirname, '../components/_style/mixin/theme.basic.styl'))
|
||||
.import(path.join(__dirname, '../components/_style/mixin/theme.variable.styl'))
|
||||
.import(path.join(__dirname, '../components/_style/mixin/util.styl'))
|
||||
.import(path.join(__dirname, '../node_modules/nib/lib/nib/vendor'))
|
||||
.import(path.join(__dirname, '../node_modules/nib/lib/nib/gradients'))
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
Automatically generated when running script 'build:variables'
|
||||
Do not edit or delete manually
|
||||
**/
|
||||
support-for-ie = var(--support-for-ie)
|
||||
color-primary = var(--color-primary)
|
||||
color-text-base = var(--color-text-base)
|
||||
color-text-base-inverse = var(--color-text-base-inverse)
|
||||
|
|
|
@ -264,8 +264,13 @@ export default {
|
|||
font-size codebox-font-size
|
||||
font-weight normal
|
||||
line-height 1.2
|
||||
if codebox-gutter is a 'unit'
|
||||
margin-left (codebox-gutter / 2)
|
||||
margin-right (codebox-gutter / 2)
|
||||
else
|
||||
margin-left "calc(%s / 2)" % codebox-gutter
|
||||
margin-right "calc(%s / 2)" % codebox-gutter
|
||||
|
||||
border-bottom codebox-border-width solid codebox-border-color
|
||||
&:first-child
|
||||
margin-left 0
|
||||
|
@ -276,7 +281,10 @@ export default {
|
|||
|
||||
.md-codebox-blink
|
||||
display block
|
||||
if tab-height is a 'unit'
|
||||
height (codebox-height * 0.8)
|
||||
else
|
||||
height "calc(%s * 0.8)" % codebox-height
|
||||
width 2px
|
||||
background-color codebox-blink-color
|
||||
animation md-codebox-flash steps(2) 1s infinite
|
||||
|
|
|
@ -288,8 +288,12 @@ export default {
|
|||
left -14px
|
||||
top 50%
|
||||
width 14px
|
||||
if tab-height is a 'unit'
|
||||
margin-top 0 - tab-height * 0.4
|
||||
height tab-height * 0.8
|
||||
else
|
||||
margin-top "calc(0 - %s * 0.4)" % tab-height
|
||||
height "calc(%s * 0.8)" % tab-height
|
||||
border-radius 50%
|
||||
box-shadow: -1px 0 12px 0 rgba(0,0,0,0.2)
|
||||
.md-tab-bar-end
|
||||
|
|
Loading…
Reference in New Issue