Skip to content

Commit

Permalink
Fixes: Style compatibility and gradient exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaming743 committed Aug 27, 2019
1 parent 4bd17d0 commit e069d52
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
8 changes: 8 additions & 0 deletions lib/components/percentPond/src/main.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
.dv-percent-pond {
position: relative;
display: flex;
flex-direction: column;
}
.dv-percent-pond svg {
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.dv-percent-pond polyline {
transition: all 0.3s;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/components/percentPond/src/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<defs>
<linearGradient :id="gradientId1" x1="0%" y1="0%" x2="100%" y2="0%">
<stop v-for="lc in linearGradient" :key="lc[0]"
:offset="lc[0]"
:offset="`${lc[0]}%`"
:stop-color="lc[1]" />
</linearGradient>

<linearGradient :id="gradientId2" x1="0%" y1="0%" :x2="gradient2XPos" y2="0%">
<stop v-for="lc in linearGradient" :key="lc[0]"
:offset="lc[0]"
:offset="`${lc[0]}%`"
:stop-color="lc[1]" />
</linearGradient>
</defs>
Expand Down
13 changes: 11 additions & 2 deletions src/components/percentPond/src/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<defs>
<linearGradient :id="gradientId1" x1="0%" y1="0%" x2="100%" y2="0%">
<stop v-for="lc in linearGradient" :key="lc[0]"
:offset="lc[0]"
:offset="`${lc[0]}%`"
:stop-color="lc[1]" />
</linearGradient>

<linearGradient :id="gradientId2" x1="0%" y1="0%" :x2="gradient2XPos" y2="0%">
<stop v-for="lc in linearGradient" :key="lc[0]"
:offset="lc[0]"
:offset="`${lc[0]}%`"
:stop-color="lc[1]" />
</linearGradient>
</defs>
Expand Down Expand Up @@ -254,9 +254,18 @@ export default {

<style lang="less">
.dv-percent-pond {
position: relative;
display: flex;
flex-direction: column;
svg {
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
polyline {
transition: all 0.3s;
}
Expand Down

0 comments on commit e069d52

Please sign in to comment.