diff --git a/packages/common/Button/src/main.vue b/packages/common/Button/src/main.vue index 91f24cce2..adb66a5d4 100644 --- a/packages/common/Button/src/main.vue +++ b/packages/common/Button/src/main.vue @@ -32,7 +32,7 @@ @@ -58,7 +58,7 @@ v-if="!circle && $slots.default" class="n-button__content" :class="{ - 'simulate-transparent-text': simulateTransparent + 'simulate-hollow-out-text': simulateHollowOut }" :style="style" > @@ -83,7 +83,7 @@ @@ -91,7 +91,7 @@ v-else-if="icon" :type="icon" :class="{ - 'simulate-transparent-text': simulateTransparent + 'simulate-hollow-out-text': simulateHollowOut }" />
diff --git a/packages/common/Slider/src/main.vue b/packages/common/Slider/src/main.vue index c26a8223a..25e13676d 100644 --- a/packages/common/Slider/src/main.vue +++ b/packages/common/Slider/src/main.vue @@ -22,14 +22,14 @@
{{ index }} diff --git a/packages/mixins/hollowoutable.js b/packages/mixins/hollowoutable.js index b17d659d9..5c0c5c5ec 100644 --- a/packages/mixins/hollowoutable.js +++ b/packages/mixins/hollowoutable.js @@ -43,7 +43,7 @@ export default { }, mounted () { this.hollowOutBackgroundColorId = 'x' + Math.random().toString(16).slice(9) - this.$el.setAttribute('n-background-id', this.hollowOutBackgroundColorId) + this.$el.setAttribute('n-hollowoutable-id', this.hollowOutBackgroundColorId) if (this.avoidHollowOut) return this.updateHollowOutStyle() }, diff --git a/packages/utils/HollowOutStyleManager.js b/packages/utils/HollowOutStyleManager.js index fe90e1a65..580a2747e 100644 --- a/packages/utils/HollowOutStyleManager.js +++ b/packages/utils/HollowOutStyleManager.js @@ -6,13 +6,13 @@ class HollowOutStyleManager { } styleForComponent (id, backgroundColor) { if (!backgroundColor) return '' - return `[n-background-id=${id}] .simulate-transparent-text { + return `[n-hollowoutable-id=${id}] .simulate-hollow-out-text { color: ${backgroundColor}!important; } -[n-background-id=${id}] .simulate-transparent-background { +[n-hollowoutable-id=${id}] .simulate-hollow-out-background { background-color: ${backgroundColor}!important; } -[n-background-id=${id}] .simulate-transparent-stroke circle { +[n-hollowoutable-id=${id}] .simulate-hollow-out-stroke circle { stroke: ${backgroundColor}!important; } `